The process of problem solving a command begins (and usually ends) with 2 steps:
1) View the help file
2) View the online docs
Start with the help function to see the usage and options for roh (works for most programmes) to give you a clue of what to do
bcftools roh --help
Notice the "usage" (how to use the funciton) + list of options:
Usage: bcftools roh [options] <in.vcf.gz>
# some selected options
--AF-file <file> read allele frequencies from file (CHR\tPOS\tREF\tALT\tAF)
-M, --rec-rate <float> constant recombination rate per bp
-s, --samples <list> list of samples to analyze [all samples]
-S, --samples-file <file> file of samples to analyze [all samples]
-o, --output <file> write output to a file [standard output]
Learn how to understand the individual parts of your command by comparing it to the "Usage" and the other options in the --help output
bcftools roh --AF-file AF.txt -M 100 Input.vcf.gz > roh.txt # Your command
bcftools roh [options] <in.vcf.gz> # usage
Breakdown:
bcftools roh # tells the computer to run the roh function in the bcftools programme
--AF-file AF.txt # [option]: file containing read allele frequencies
-M 100 # [option]: constant recombination rate per bp
Input.vcf.gz # <in.vcf.gz>: your compressed input vcf file
Now you should be able to conclude what is missing:
Error: Missing the option -s, --sample # so from --help, you are not providing a list of samples
So the next question is: what is "a list of samples"? For that, go find the online docs (just google "bcftools roh docs"):
BCFtools Manual page
Now look through the document for the more comprehensive explanation of how to provide the correct input for -s or -S
So to recap: Use --help, then find the manual for more detail.
Again I was to slow ;)
fin swimmer
@YaGalbi I already searched through options of bcftools roh and read bcftools manual pages but I did not see any option in bcftools roh manual in which we can specify many samples. Also I tried command with one sample name and it worked just fine. Here are the options when I tried bcftools roh help.
Hello,
check the version of your
bcftools
and update if necessary.fin swimmer
Thanks I checked and found I have bcftools 1.2
Then you have to update to at least 1.4. That's the first version where
-S, --samples-file FILE
appears in the manual.