Skip to content

Instantly share code, notes, and snippets.

@sashaphanes
Created April 19, 2013 18:55
Show Gist options
  • Save sashaphanes/5422402 to your computer and use it in GitHub Desktop.
Save sashaphanes/5422402 to your computer and use it in GitHub Desktop.
Sanger recently released mouse SNPs (in VCF format) from next-generation sequencing for 18 strains. Parse all SNPs where the alternative alleles are homozygous for strain 129S1 for gene Impact, no local save #ftp://ftp-mouse.sanger.ac.uk/current_snps/mgp.v3.snps.rsIDdbSNPv137.vcf.gz
lftp -c 'open -e "zcat mgp.v3.snps.rsIDdbSNPv137.vcf.gz” ftp-mouse.sanger.ac.uk/current_snps/' | perl -ne '{chomp; if (/^#CHROM/) {print "$_\n"; }else {@a = split (/\t/, $_); print "$_\n" if ($a[0] ==18 and $a[1] >= 12972252 and $a[1] <= 12992948 and $a[10] =~ /^1\/1|^1\|1/); } }' > mm10.129S1.Impact.altHom &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment