How to keep sample name while using samtools mpileup + varscan to do variant call?
1
0
Entering edit mode
5.8 years ago
MatthewP ★ 1.4k

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.

samtools mpileup varscan • 3.0k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
2
Entering edit mode
5.8 years ago

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 COMMENT
0
Entering edit mode

In creating the multisample mpileup with SAMtools for subsequent variant calling with Varscan2, did you populate the Bamlist file as alternating normal - tumor pairs or the sequence doesn't matter?

Eg, Bamlist.txt with each sample on a separate line:

NA1230-norm.bam
NA1230-tumor.bam
NA1231-norm.bam
NA1231-tumor.bam
ADD REPLY

Login before adding your answer.

Traffic: 2685 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