Beginner here trying to get a pipeline working in bash. If somebody can see why when I run the following I get:
-bash: `$i': not a valid identifier,
that would be really helpful. Also if there are other mistakes please let me know
for $i in /home/regionstextfile; do tabix /sequences/human_variation/snps/genotypes.vcf.gz $i | vcftools --window-pi 10000 >> /home/Testgenomesdata/genomesregions.txt; done
The idea is for each line in regionstextfile (which contains genome coordinates) run a program called tabix
in the vcf.bz
file, then with the output run vcftools
with the specified options, then put all the outputs into the genomesregions.txt
file.