Hi all,
Probably this is a FAQ, but still i didnt find a good answer..
I am converting from bam to fastq.
My bam's are paired end, coordinated sorted and very large (100Gb+).
For my analysis i need only the first pair.
Right now i am using these 2 commands:
For converting bam to sam for the first pair.
and for parsing the fastq from the sam format.
this i took from:
How can i be sure that i got all the reads? mapped + unmapped of the first pair?
Thanks,
Pap
Probably this is a FAQ, but still i didnt find a good answer..
I am converting from bam to fastq.
My bam's are paired end, coordinated sorted and very large (100Gb+).
For my analysis i need only the first pair.
Right now i am using these 2 commands:
For converting bam to sam for the first pair.
Code:
samtools view -h -f 0x0040 $line > $line.pe1.sam
Code:
cat $line.pe1.sam | grep -v ^@ | awk '{print "@"$1"\n"$10"\n+\n"$11}' > $line.pe1.sam.fq
How can i be sure that i got all the reads? mapped + unmapped of the first pair?
Thanks,
Pap
Comment