This is a test version of Biostars. For the public version, visit https://www.biostars.org.
a problem when ran vcf-sort

First time running vcf-sort and met a problem. Do not very understand why genome.dict in the command is not a directory. My aim is to use genome.dict as a directory or as the temporary directory for sorting. so i use -t genome.dict according to the --help

$ vcf-sort -t genome.dict new.vcf.gz > outnew.vcf&

sort -k1,1d -T genome.dict -k2,2n
sort: cannot create temporary file in `genome.dict': Not a directory

[1]+  Broken pipe             /hpf/tools/centos6/vcftools/0.1.14-6/bin/vcf-sort -t genome.dict new.vcf.gz > outnew.vcf
vcf sort dict

1 answer

> $ sort -k1,1d -T genome.dict -k2,2n

you're using the linux-sort ( http://man7.org/linux/man-pages/man1/sort.1.html ) here, not vcf-sort

option -T is

   -T, --temporary-directory=DIR
          use DIR for temporaries, not $TMPDIR or /tmp; multiple options
          specify multiple directories

Sorry Pirrere, I have removed "$" before " sort" I did not use linux-sort, "> sort -k1,1d -T genome.dict -k2,2n" just pop up right away after i run "$ vcf-sort -t genome.dict new.vcf.gz > outnew.vcf&"

when i run

$ vcf-sort --help

it shows

Usage: vcf-sort > out.vcf
       cat file.vcf | vcf-sort > out.vcf
Options:
   -c, --chromosomal-order         Use natural ordering (1,2,10,MT,X) rather then the default (1,10,2,MT,X). This requires
                                       new version of the unix "sort" command which supports the --version-sort option.
   -t, --temporary-directory       Use a directory other than /tmp as the temporary directory for sorting.
   -h, -?, --help                  This help message.

Log in to answer this question.