|
From: Brent P. <bpe...@gm...> - 2012-01-19 13:37:18
|
On Wed, Jan 18, 2012 at 7:02 PM, Brent Pedersen <bpe...@gm...> wrote: > On Tue, Jan 17, 2012 at 11:24 AM, Heng Li <lh...@sa...> wrote: >> You may try to provide a .fai file with "-D". For complex processing of VCF files, it is recommended to convert vcf to bcf and when you do the conversion, bcftools will force you to use this "-D" option in order to construct the sequence dictionary before reading VCF. >> > > Thanks for the reply. I have started using BCF rather than VCF. > > Now, I find that the same invocation of bcftools gives a different > order of samples though the sample labels remain unchanged. > > If I repeatedly run the following to show just the genotypes for a > single position: > $ bash call2.sh | grep -E "5659587|CHROM" -m 2 | cut -f 10- > The order of the sample labels is unchanged, but the values in the > variant call can be shuffled. > Here are 2 example outputs (without changing the input): > LTRC_000091_lung LTRC_274462_lung LTRC_049600_lung NJC_020357_lung > 1/1:175,39,0:13:0:36:1/1:36 0/0:0,141,255:47:1228617010:99:0/0:99 0/0:0,148,255:49:2897969:99:0/0:99 1/1:200,57,0:19:825699380:54:1/1:54 > > LTRC_000091_lung LTRC_274462_lung LTRC_049600_lung NJC_020357_lung > 1/1:200,57,0:19:825699380:54:1/1:54 1/1:175,39,0:13:0:36:1/1:36 0/0:0,148,255:49:2897969:99:0/0:99 0/0:0,141,255:47:1228617010:99:0/0:99 > > the contents of call2.sh are: > bcftools view -gvcs $SAMPLES -1 2 -p 0.01 -X 0.01 -U 100 data/var.raw.bcf > > where $SAMPLES contains: > LTRC_000091_lung > LTRC_274462_lung > LTRC_049600_lung > NJC_020357_lung > > I suspect the latter output above is correct since it differentiates > the first 2 from the latter 2. > Am I doing something wrong here? In case it's of importance, my input > bcf file has 4 additional samples that I'm not including the the > $SAMPLES file. > thanks, > -Brent In case this is unclear or a bug, I put a self-contained example with a ex.sh script, and ex.bcf and a samples.txt. http://amc-sandbox.ucdenver.edu/~brentp/u/bcf-ex.tgz If I repeatedly run ex.sh, the order of samples in the output varies. |