Split RNA-seq reads
1
0
Entering edit mode
6.6 years ago
mkh ▴ 60

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.2k views
ADD COMMENT
1
Entering edit mode
6.6 years ago
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
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2512 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6