![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
extract full fasta file for local blast hits | Oyster | Bioinformatics | 9 | 07-07-2019 08:39 AM |
extract alignment from SAM with a GFF file | NicoBxl | Bioinformatics | 4 | 08-02-2011 02:45 PM |
Extract perfectly mapped reads from SAM/BAM file | Graham Etherington | Bioinformatics | 2 | 07-21-2011 08:27 AM |
Filtering multi hits from sam file | David Lyon | Bioinformatics | 1 | 05-27-2010 12:18 PM |
hits information in sam file | totalnew | Bioinformatics | 0 | 08-06-2009 02:15 PM |
![]() |
|
Thread Tools |
![]() |
#1 |
Member
Location: il Join Date: Jun 2010
Posts: 64
|
![]()
I aligned reads with bwa and I want to get a set of the reads that mapped uniquely to the genome.
I understood from samtools faq that they suggest to look at 'reliable' rather than `unique' by : samtools view -bq 1 aln.bam > aln-reliable.bam http://sourceforge.net/apps/mediawik...?title=SAM_FAQ However, I am interested to get the subset of the uniquely mapped reads, in order to do some calculations on it. How can one do it? |
![]() |
![]() |
![]() |
#2 |
Senior Member
Location: 41°17'49"N / 2°4'42"E Join Date: Oct 2008
Posts: 323
|
![]()
Take a look to this thread.
I'd suggest you follow bwa's FAQ advice and rely more in the MAPQ. Still, if you want to filter uniquely mapped: Code:
$ samtools view bwa.bam | grep "XT:A:U"
__________________
-drd |
![]() |
![]() |
![]() |
#3 |
Member
Location: il Join Date: Jun 2010
Posts: 64
|
![]()
Thanks a lot!
|
![]() |
![]() |
![]() |
#4 |
Senior Member
Location: Asiana Join Date: Feb 2009
Posts: 124
|
![]()
Hi,
I am also looking for such solution. But in my bam file, I don't see any Code:
XT:A:U Code:
test_1:8:69:19633:9434 0 chr10 5423197 4 45M * 0 0 CACACAACCCCCACACCAAACACACACCCCCCACACACAACAAAC 0.2B90+)*=@8@################################ XD:Z:6C11C15G4CACT2 SM:i:4 test_1:8:56:11474:20981 0 chr10 7323903 6 45M * 0 0 ATCAAGCGATCCTCCCACCTCATCCCCCTAAGTACCTGTGACTAA 757@54;3;1@@@@@22@########################### XD:Z:22G11G3G5C SM:i:6 |
![]() |
![]() |
![]() |
#5 |
Member
Location: il Join Date: Jun 2010
Posts: 64
|
![]()
I am not an expert, but don't think you can extract this from the _export file. I think XT:A:U is specific to bwa (maybe also other aligners?).
Maybe you would like to use the _sorted file from the Illumina pipeline: the desciption of the _sorted file- from CASAVA 1.7 manual p. 73: This output file is similar to s_N_export.txt, except it contains only entries for reads which pass purity filtering and have a unique alignment in the reference. These are sorted by order of their alignment position, which is meant to facilitate the extraction of ranges of reads for purposes of visualization or SNP calling. These files are only produced if the flag WITH_SORTED is used." Alternatively, you can take your reads and align them with bwa (or with other aligner that gives you this info). |
![]() |
![]() |
![]() |
#6 |
Member
Location: india Join Date: Jan 2014
Posts: 11
|
![]()
hello all,
I have Illumina data, which I mapped through Bowtie2 and got a sam file. Now I need to extract the reads which are being shown uniquely one time. Kindly guide if something could be done for that. I have tried a bit of commands for the above, but failed to get those reads separated. Kindly guide ASAP. |
![]() |
![]() |
![]() |
#7 | |
Senior Member
Location: San Francisco, CA Join Date: Feb 2011
Posts: 286
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#8 |
Member
Location: india Join Date: Jan 2014
Posts: 11
|
![]()
hello Wallysb01,
after searching a lot for Bowtie2 to get uniquely matched reads, I think bowtie 1 is the only way out. thanku for the same. |
![]() |
![]() |
![]() |
#9 |
Devon Ryan
Location: Freiburg, Germany Join Date: Jul 2011
Posts: 3,480
|
![]()
Unique alignments in bowtie2 have MAPQ>=2, so you can just filter the results by that.
|
![]() |
![]() |
![]() |
#10 |
Member
Location: Bhopal Join Date: Jul 2019
Posts: 19
|
![]()
Possibly you might want to utilize the _sorted document from the Illumina pipeline:
the desciption of the _sorted document from CASAVA 1.7 manual p. 73: This yield document is like s_N_export.txt, with the exception of it contains entries for peruses which pass immaculateness separating and have a special arrangement in the reference. These are arranged by request of their arrangement position, which is intended to encourage the extraction of scopes of peruses for motivations behind representation or SNP calling. These documents are possibly created if the banner WITH_SORTED is utilized." On the other hand, you can take your peruses and adjust them to bwa (or with other aligner that gives you this data). |
![]() |
![]() |
![]() |
#11 |
Member
Location: Bhopal Join Date: Jul 2019
Posts: 19
|
![]()
Possibly you might want to utilize the _sorted document from the Illumina pipeline:
the desciption of the _sorted document from CASAVA 1.7 manual p. 73: This yield document is like s_N_export.txt, with the exception of it contains entries for peruses which pass immaculateness separating and have a special arrangement in the reference. These are arranged by request of their arrangement position, which is intended to encourage the extraction of scopes of peruses for motivations behind representation or SNP calling. These documents are possibly created if the banner WITH_SORTED is utilized." On the other hand, you can take your peruses and adjust them to bwa (or with other aligner that gives you this data). |
![]() |
![]() |
![]() |
Thread Tools | |
|
|