from unmapped bam file picard samtofastq produced no output
1
0
Entering edit mode
4.7 years ago

I generated bam of unmapped reads using:

$ samtools view -b -f 4 input.bam >unmapped.bam

$ samtools flagstat unmapped.bam

2313037 + 4694809 in total (QC-passed reads + QC-failed reads) 0 + 0 secondary 0 + 0 supplementary 0 + 0 duplicates 0 + 0 mapped (0.00%:0.00%) 2313037 + 4694809 paired in sequencing 750304 + 2057201 read1 1562733 + 2637608 read2 0 + 0 properly paired (0.00%:0.00%) 0 + 0 with itself and mate mapped 0 + 0 singletons (0.00%:0.00%) 0 + 0 with mate mapped to a different chr 0 + 0 with mate mapped to a different chr (mapQ>=5)

$ samtools view unmapped.bam | head -3

HS9_357:1:2102:12947:42607 629 chr1 10537 0 * = 10537 0 AGGCGGAGCAGGGGGCTCCTCAGATGATGATTATTCCCCACCTTCTAAGAGAAAAAGACCAACGACCCACCACAG <<8<>;;;=896367???>=?>;8)?>???><351???>:>?>?::199BEC<

However, when I use

$ bedtool bamtobed -i unmapped.bam

or

$ picard samtofastq I=unmapped.bam F=R1.fastq F2=R2.fastq FU=unmapped.fastq

, they do not print any output.

I am not sure why this is happening, any suggestion will be very useful.

RNA-Seq picard bedtools • 1.4k views
ADD COMMENT
0
Entering edit mode
4.5 years ago

This link might be helpful samtools extract unmapped reads

ADD COMMENT

Login before adding your answer.

Traffic: 1725 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