Generating Consensus File With Samtools
1
1
Entering edit mode
14.0 years ago
Lena ▴ 10

Hi!

I tried to create a fastq consensus file out of my bam file generated with Mosaik (MosaikText). I used the Samtools pileup command, as followed:

$ samtools pileup -cf reference_genome.fa alignement.bam ! samtools.pl pileup2fq -D100 > consensus_sequence.fastq

I was expecting to get this :

@chrX
nnnnnnnatgtttgcctgtacacacacactgtaaannnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
agttctatgtcatgtactagtagggtactatatatnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
@chr1
nnnnnnnatgtttgcctgtacacacacactgtaaannnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
agttctatgtcatgtactagtagggtactatatatnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
@chr2 etc.

But I get this :

@chrX
nnngtnnnnnnctnnnnnnnannnnnnnnnnngnnnnnnncngnnnnnnnnan
nnnnnnnntgnnnnnnnnnnnnnnnnnnnnnnnnnnnnnannnnnnnnnnnnn
nannnnnnctnnnnnnnnnnnnngnnnnnnnnnnntnnnnnnnnnnnnnnnnn
@chr1
nnngtnnnnnnctnnnnnnnannnnnnnnnnngnnnnnnncngnnnnnnnnan
nnnnnnnntgnnnnnnnnnnnnnnnnnnnnnnnnnnnnnannnnnnnnnnnnn
nannnnnnctnnnnnnnnnnnnngnnnnnnnnnnntnnnnnnnnnnnnnnnnn
@chr2 etc.

I really don't know what happened! Any suggestions? Do somebody has maybe another solution to generate such a consensus file?

Thanks à lot! Lena

consensus samtools pileup fastq • 4.6k views
ADD COMMENT
0
Entering edit mode

Generate the intermediate raw pileup file and see how it looks....based on that you can see the read coverage and then you can expect the consensus sequence.

ADD REPLY
0
Entering edit mode

can you show the the pileup file for the same to look in to it...

ADD REPLY
1
Entering edit mode
14.0 years ago

You seem to be using a bang (!) instead of a pipe (|) in your command. In most shells, ! executes a previous command from the history, so ! samtools ... will execute the last command that started with the string samtools.

However, as written, your command should give you no result at all (plus some other error messages), so I'm not sure how you got your output.

ADD COMMENT
0
Entering edit mode

Hi!

Actually, I used a pipe (|) but could not write this character in my question because I was using a mac keyboard this morning (not all character available), which is why I used the closest one I found : ! ... sorry!!

Do you have another idea?

Thanks already a lot for your answer!

Lena

ADD REPLY

Login before adding your answer.

Traffic: 1980 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6