This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Split RNA-seq reads

Hi all,

I have 75bp RNA-seq reads. I would like to split it to 38*37 bp. Is somebody know how is the easiest way to do that? The reads files are in *.gz format and I don't want to unzip it. Thanks Morteza

rna-seq

1 answer

gunzip -c fastq.gz | awk '{if(NR%4==1 || NR%4==3) {print;} else {printf("%s\n",substr($0,1,38));}}' | gzip  > 38.fq.gz
gunzip -c fastq.gz | awk '{if(NR%4==1 || NR%4==3) {print;} else {printf("%s\n",substr($0,39));}}' | gzip  > 37.fq.gz

cutadapt -u 5 is also do the same job!!!

cutadapt -u 5 will remove 5 bases from the front of each read. How is that same job as @Pierre's code?

Log in to answer this question.