Skip to content

Instantly share code, notes, and snippets.

@thirdknife
Created December 16, 2014 05:08
Show Gist options
  • Save thirdknife/94a277cb506b7275fc4d to your computer and use it in GitHub Desktop.
Save thirdknife/94a277cb506b7275fc4d to your computer and use it in GitHub Desktop.
#!/bin/bash
# My first script
# make sure you always put $f in double quotes to avoid any nasty surprises i.e. "$f"
for f in ~/Desktop/dsg1_1000Genome/1000Genome_dsg1/1000Genome_dsg1/*
do
echo "Processing $f file..."
mv $f $f".vcf"
bgzip $f".vcf"
cat ~/Desktop/dsg1_1000Genome/arch_dsg1.fasta | perl vcf-consensus -s $f $f".vcf.gz" > $f".fa"
# rm "$f"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment