Question: Samtools Error: Creating a Consensus fastq Sequence from Bam File
0
gravatar for eden.maloney
4.4 years ago by
eden.maloney10
United States
eden.maloney10 wrote:

Hi Everyone, 

I am a n00b to CS and I need really explicit instructions on how to fix this code. Thank you for your time!

I used these two tutorials: 

http://samtools.sourceforge.net/mpileup.shtml

https://www.biostars.org/p/75489/https://www.biostars.org/p/75489/​

To Create this Code: 

samtools mpileup -uf B95.8\ Reference\ Genome.fasta test.sorted.bam | bcftools view -cg - | vcfutils.pl vcf2fq > cnsWIN.fq

And I am getting these errors:

Error: Could not parse --min-ac g

[mpileup] 1 samples in 1 input files

Use of uninitialized value $l in numeric lt (<) at /Users/Eden/Library/bcftools-1.2/vcfutils.pl line 566.

Use of uninitialized value $l in numeric lt (<) at /Users/Eden/Library/bcftools-1.2/vcfutils.pl line 566.

<mpileup> Set max per-file depth to 8000

ADD COMMENTlink modified 4.4 years ago • written 4.4 years ago by eden.maloney10

You posted twice that question, please delete one. 

ADD REPLYlink written 4.4 years ago by madkitty580

Sorry! will do!

ADD REPLYlink written 4.4 years ago by eden.maloney10

-d8000 fixes: <mpileup> Set max per-file depth to 8000

ADD REPLYlink written 4.4 years ago by eden.maloney10
0
gravatar for eden.maloney
4.4 years ago by
eden.maloney10
United States
eden.maloney10 wrote:

 

Converting Bam to Fastq

bwa index -a bwtsw 1000.fasta

  bwa aln 1000.fasta ERR244000_1.fastq > aln_sa1b.sai

  bwa aln 1000.fasta ERR244000_2.fastq > aln_sa2b.sai

  bwa sampe 1000.fasta aln_sa1b.sai aln_sa2b.sai ERR244000_1.fastq ERR244000_2.fastq > readset_refb_bwa.sam

  samtools view -bS -o readset_refb_bwa.bam readset_refb_bwa.sam

  samtools sort readset_refb_bwa.bam readset_refb_bwa.sorted

  samtools index readset_refb_bwa.sorted.bam

  samtools mpileup -d8000 -uf 1000.fasta readset_refb_bwa.sorted.bam | bcftools call -c | vcfutils.pl vcf2fq > cnsnew.fq

 

ADD COMMENTlink written 4.4 years ago by eden.maloney10
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 2.3.0
Traffic: 2157 users visited in the last hour