![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
No output from Samtools pileup | pravee1216 | Bioinformatics | 1 | 12-05-2012 03:59 AM |
samtools pileup | BioSlayer | Bioinformatics | 9 | 01-16-2012 03:10 AM |
samtools pileup | raghu1990 | Bioinformatics | 0 | 06-28-2011 02:26 AM |
samtools pileup | wisosonic | Bioinformatics | 0 | 05-11-2011 04:57 AM |
Samtools version 1.0.7 and 1.0.10 different pileup | mrxcm3 | Bioinformatics | 1 | 11-19-2010 07:24 AM |
![]() |
|
Thread Tools |
![]() |
#1 |
Member
Location: Norwich, England. Join Date: Apr 2010
Posts: 22
|
![]()
Hi,
I'm trying to parse the Samtools Pileup format in Perl. I've created a paired-end assembly using BWA (aln, sampe) and then used Samtools to create a pileup (using import - sort - index - pileup). What I want to do is to open up the pileup (which is obviously in the Samtools Pileup format) and iterate over each position of the pileup, examining differences in base-calls. Does anyone know of anything available, or have and sample code they could post? Many thanks. |
![]() |
![]() |
![]() |
#2 |
Member
Location: Germany Join Date: Mar 2009
Posts: 28
|
![]()
You cannot open a file in Pileup format with Bio:
![]() You should convert your SAM file to BAM format (samtools view) and sort it (samtools sort), maybe index it too? I'm not sure (samtools index). Then follow the instructions in the CPAN website, which are very, veryhelpful. Basically: use Bio: ![]() my $sam = Bio: ![]() -fasta => "my_ref.fasta"); my @targets = $sam->seq_ids; foreach my $chr (@targets){ $sam->pileup($chr,$my_subroutine); } where $my_subroutine is a subroutine that you'll need to get to do what you want: snp calling, coverage calculation... |
![]() |
![]() |
![]() |
#3 | |
Member
Location: Norwich, England. Join Date: Apr 2010
Posts: 22
|
![]() Quote:
Thanks for your answer. I'd realised that Bio::DB:Sam couldn't parse the pileup, so this is why I am asking if anyone has, or knows about, anything that could parse it, before I spent time writing a Samtools parser myself. I have a 'Parser.pm' module that parses various pileup formats (maq, bowtie, novoalign, etc), but I haven't added one for Samtools format yet. Cheers, Graham |
|
![]() |
![]() |
![]() |
#4 |
Member
Location: Penn State Join Date: Apr 2009
Posts: 22
|
![]() |
![]() |
![]() |
![]() |
#5 | |
Member
Location: Norwich, England. Join Date: Apr 2010
Posts: 22
|
![]() Quote:
Best wishes, Graham |
|
![]() |
![]() |
![]() |
#6 |
Junior Member
Location: Earth Join Date: Aug 2012
Posts: 1
|
![]()
I noticed that the referenced Galaxy code does not check for the '>' and '<' characters. Can anybody please provide some help how to process those? I.e., I don't really understand what "reference skip" means and would think that such a symbol means that the read does not cover the the respective position. Any help would be appreciated, thanks!
|
![]() |
![]() |
![]() |
Tags |
pileup, samtools |
Thread Tools | |
|
|