Question: Sort Sam Or Bam
0
gravatar for Clare Sloggett
7.0 years ago by
Clare Sloggett • 120 wrote:
Hi galaxy users, Am I right in thinking there is no tool for sorting a sam/bam file in Galaxy? I think this has probably been discussed before, sorry. I just want to check I haven't missed anything, since sibling tools from e.g. the samtools and picard suites are wrapped. Thanks, Clare -- E: sloc@unimelb.edu.au P: 03 903 53357 M: 0414 854 759
samtools bam • 2.7k views
ADD COMMENT • link • modified 7.0 years ago by Jennifer Hillman Jackson ♦ 25k • written 7.0 years ago by Clare Sloggett • 120
0
gravatar for Jennifer Hillman Jackson
7.0 years ago by
United States
Jennifer Hillman Jackson ♦ 25k wrote:
Hello Clare, An example of how to sort a SAM file is included in the workflow from #2 on this FAQ (it can be imported and the sort modified as needed): http://usegalaxy.org/u/jeremy/p/transcriptome-analysis-faq If you are starting with a BAM file, convert BAM->SAM, then after sorting, back with SAM->BAM, using tools in the group "NGS: SAM Tools". Best regards, Jen Galaxy team -- Jennifer Jackson http://usegalaxy.org http://galaxyproject.org/wiki/Support
ADD COMMENT • link written 7.0 years ago by Jennifer Hillman Jackson ♦ 25k
Hi Jen, Thanks for this, belatedly! And happy new year! I think this will work for some of my cases but possibly not all, since it looks like chromosomes are being sorted alphabetically. It depends what the reference genome used was and what tools you're planning to use after sorting as to whether this is ok. I was initially just wondering why 'samtools sort' hadn't been wrapped - not as a complaint, but since the various other samtools options mostly seem to be already wrapped, I wondered if there was some particular reason not to have this one. If I were to try to wrap 'samtools sort' myself is there some difficulty I should know about? Thanks again, Clare -- E: sloc@unimelb.edu.au P: 03 903 53357 M: 0414 854 759
ADD REPLY • link written 6.9 years ago by Clare Sloggett • 120
Hi Clare, I ran into a similar question testing out GATK pipeline on Galaxy. My solution was to always convert my SAM files to BAM. The wrapper also sorts the final BAM file output and it does this using the known 'samtools sort', which sorts chromosomes in the same order of the reference genome. The reference genome can be automatically selected by the build associated with the dataset or choose from the history. I haven't confirmed if a conversion from BAM to SAM would do the same thing. Hope it helps, Carlos
ADD REPLY • link written 6.9 years ago by Carlos Borroto • 390
Hi Carlos, Thanks! I didn't realise the conversion was doing that. In fact I want bam files (I'm also using GATK) so this is really helpful. Cheers, Clare On Thu, Jan 19, 2012 at 2:32 AM, Carlos Borroto -- E: sloc@unimelb.edu.au P: 03 903 53357 M: 0414 854 759
ADD REPLY • link written 6.9 years ago by Clare Sloggett • 120
Hi Claire, Your welcome!. If you feel it could be helpful, this is what I have so far as a workflow for GATK: http://test.g2.bx.psu.edu/u/cjav/w/gatk Is not complete, but I think it could be a good starting point. Please if you ended using this workflow as a starting point and find something you think it could be improve, let me know. There are things like which annotations or ROD file I should use, that I haven't been able to quite understand. Regards, Carlos
ADD REPLY • link written 6.9 years ago by Carlos Borroto • 390
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 186 users visited in the last hour