Question: How to keep sample name while using samtools mpileup + varscan to do variant call?
0
gravatar for MatthewP
8 months ago by
MatthewP80
China
MatthewP80 wrote:

Hello, everyone. I am using samtools mpileup and varscan to do variant call, but this will lost all the sample names. For example if I have 10 bam file name like 18R07049.bam ... 18R07058.bam, I pileup them all to 18R07.mpileup:

samtools mpileup -f myref.fasta -o 18R07.mpileup *.bam

Then use varscan mpileup2cns:

java -jar varscan.jar mpileup2cns 18R07.mpileup --output-vcf 1 > 18R07.vcf

When I checked 18R07.vcf i found it lost all the sample names, and become:

sample1 sample2 ... sample10

Then I tried not to mpileup all file to one file, I mpileup them separately and varscan mpileup2cns one by one, still it lost all sample names. I want to know how can I keep those sample names? thanks everyone.

mpileup samtools varscan • 479 views
ADD COMMENTlink modified 8 months ago by Pierre Lindenbaum118k • written 8 months ago by MatthewP80

Why don't you simply awk them into the VCF when the process is finished?

ADD REPLYlink written 8 months ago by ATpoint14k
1
gravatar for Pierre Lindenbaum
8 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum118k wrote:

http://varscan.sourceforge.net/germline-calling.html

As of v2.3.1, you can provide a list of sample names to use in the VCF header with the --vcf-sample-list parameter. This list should be in plain text, one sample per line, in the order that samples appear in the raw mpileup input.

ADD COMMENTlink written 8 months ago by Pierre Lindenbaum118k
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: 1033 users visited in the last hour