|
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 |
|
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. 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
|