Hi,

Can someone tell me how to pipe bwa and samtools to get to a pileup2fq from a "bwa sampe"? I am trying this but it uses a humongous amount of memory and doesn't produce any results past sampe:

~/src/bwa/latest/bwa-0.5.7/bwa sampe collapsed.fasta.gz collapsed.aln_sa1.sai collapsed.aln_sa2.sai _?_1_pf.fastq _2_pf.fastq | ~/src/samtools/latest/samtools/samtools view -bt collapsed.fasta.gz - | ~/src/samtools/latest/samtools/samtools sort -m 9000000 - - | ~/src/samtools/latest/samtools/samtools pileup -cf collapsed.fasta.gz - | perl ~/src/samtools/latest/samtools/misc/samtools.pl pileup2fq -D1 | gzip > collapsed.final.fastq.gz

asked 13 Aug '10, 14:45

avilella's gravatar image

avilella
7628
accept rate: 0%


Sorting is not piping friendly. You may stop at sorting and then call pileup and pileup2fq after you get sorted alignment. Also note that sorting needs to load a batch of alignments into memory and sampe is also memory hungry. I prefer not to run sampe and sorting at the same time.

link

answered 14 Aug '10, 09:04

lh3's gravatar image

lh3
22191
accept rate: 10%

Because of the memory requirements involved, I would run them as separate commands, without piping, using a shell script (or Perl script if that suits you better).

(16 Aug '10, 12:31) mrawlins
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×17
×13
×1

Asked: 13 Aug '10, 14:45

Seen: 1,264 times

Last updated: 16 Aug '10, 12:31

powered by OSQA