Obtaining bcf and vcf files and use bcf tool annotate
1
0
Entering edit mode
14 months ago
anasjamshed ▴ 120

I have vcf file that I obtained from the galaxy and I want to run bcftools annotate. I ran the following command:

bcftools annotate -a Galaxy96-\[Galaxy45-\[VarScan_on_data_44\].vcf\].vcf -o samtools_annotated.vcf

But no output file is generated? How can I use different parameters of bcf tools successfully

bcf

bcftools • 1.4k views
ADD COMMENT
0
Entering edit mode

There are certain conventions in usage documents:

➜ bcftools annotate

About:   Annotate and edit VCF/BCF files.
Usage:   bcftools annotate [options] <in.vcf.gz>

Options:
   -a, --annotations <file>       VCF file or tabix-indexed file with annotations: CHR\tPOS[\tVALUE]+
       --collapse <string>        matching records by <snps|indels|both|all|some|none>, see man page for details [some]
   -c, --columns <list>           list of columns in the annotation file, e.g. CHROM,POS,REF,ALT,-,INFO/TAG. See man page for details
   -e, --exclude <expr>           exclude sites for which the expression is true (see man page for details)
   -h, --header-lines <file>      lines which should be appended to the VCF header
   -I, --set-id [+]<format>       set ID column, see man page for details
   -i, --include <expr>           select sites for which the expression is true (see man page for details)
   -k, --keep-sites               leave -i/-e sites unchanged instead of discarding them
   -m, --mark-sites [+-]<tag>     add INFO/tag flag to sites which are ("+") or are not ("-") listed in the -a file
       --no-version               do not append version and command line to the header
   -o, --output <file>            write output to a file [standard output]
   -O, --output-type <b|u|z|v>    b: compressed BCF, u: uncompressed BCF, z: compressed VCF, v: uncompressed VCF [v]
   -r, --regions <region>         restrict to comma-separated list of regions
   -R, --regions-file <file>      restrict to regions listed in a file
       --rename-chrs <file>       rename sequences according to map file: from\tto
   -s, --samples [^]<list>        comma separated list of samples to annotate (or exclude with "^" prefix)
   -S, --samples-file [^]<file>   file of samples to annotate (or exclude with "^" prefix)
   -x, --remove <list>            list of annotations (e.g. ID,INFO/DP,FORMAT/DP,FILTER) to remove (or keep with "^" prefix). See man page for details
       --threads <int>            number of extra output compression threads [0]

The first line in usage says

bcftools annotate [options] <in.vcf.gz>
#                 ^       ^               #square brackets usually denote optional parameters
#                           ^         ^   #angle brackets usually denote required parameters

You've provided an optional parameter but are missing the required parameter. This sort of mistake happens a lot, so this advice should help you with most tools' usage docs.

ADD REPLY
0
Entering edit mode
14 months ago
bcftools annotate -a Galaxy96-\[Galaxy45-\[VarScan_on_data_44\].vcf\].vcf -o samtools_annotated.vcf

1) this is a strange path.

2) here you gave the argument for the -a option

   -a, --annotations FILE          VCF file or tabix-indexed FILE with annotations: CHR\tPOS[\tVALUE]+

but there is no input VCF. by the way the file for '-a' CANNOT be a plain vcf file. It must be a bgzf file. Unless this strange path was your input file and therefore the path for the option -a is missing

ADD COMMENT
0
Entering edit mode

it's not missing , after -a i wrote Galaxy96-[Galaxy45-[VarScan_on_data_44].vcf].vcf

ADD REPLY
0
Entering edit mode

it's not missing , after -a i wrote Galaxy96-[Galaxy45-[VarScan_on_data_44].vcf].vcf

so tell me. What is the name of the annotation file and what is the name of the input vcf ?

ADD REPLY
0
Entering edit mode

I only have input file named "Galaxy96-[Galaxy45-[VarScan_on_data_44].vcf].vcf"

ADD REPLY
0
Entering edit mode

if you want to annotate this VCF file, you need an annotation file... Quod erat faciendum

ADD REPLY
0
Entering edit mode

Do you mean just the annotation file or vcf file?

ADD REPLY
1
Entering edit mode

if you want to annotate this VCF file, you need an annotation file

They're obviously two different files. Read about the VCF annotation process before attempting to annotate VCF files on your own. At this point, your questions are starting to look like attempts at trolling.

ADD REPLY

Login before adding your answer.

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