2
$\begingroup$

Previously, when I needed to find a genomic feature (promoter, CDS, repeat etc) that underwent mutation (SNP) I used my own scripts to load an annotation file, parse it, map the SNP's position and output the sequence of the feature. Now that I'm moving from microbes to mammals with huge annotations, introns/exons and huge genomes, my scripts don't work that well and I'm sort of lazy to optimize the code or rewrite it in a faster language, since I'm sure there should be some prominent tools for the task. That's it, could you recommend me some tools that do the following:

  1. Given a reference genome, annotation and a VCF (or similar variant file) match the SNPs to genomic features in the annotation
  2. Output the entire feature that underwent mutation, e.g. if the SNP happened in a protein-coding gene, I need to have the entire protein-coding sequence not just an exon/intron.

Thanks in advance.

$\endgroup$
4
  • 1
    $\begingroup$ The GTF/GFF format is universal. Why would your scripts not work? Try stream reading. It can be done in python and is default in awk. $\endgroup$
    – WYSIWYG
    Jul 24, 2015 at 9:35
  • $\begingroup$ @WYSIWYG My scripts is in fact written in Python. It pulls out the annotation region it hits. In bacteria there are no introns in protein-coding sequences, hence if I get an annotation hit I can simply pull the region. In mammals the script sometimes pulls a piece of a gene (an intron or an exon), though I know how to fix that issue. More importantly, my script stores the entire annotation file in memory as a hash-table of ranges. That's not too much efficient. $\endgroup$ Jul 24, 2015 at 9:46
  • $\begingroup$ The second column in the GTF is the feature name. You can parse only for exons. There are programmatic ways of limiting the memory usage; one easy way is to run the script chromosome-wise and just store the features that you are interested in. $\endgroup$
    – WYSIWYG
    Jul 24, 2015 at 9:51
  • $\begingroup$ I'm voting to close this question as off-topic because it is about programming, not biology. $\endgroup$
    – MattDMo
    Jul 24, 2015 at 13:38

1 Answer 1

0
$\begingroup$

Well, after 2 weeks and several thousand lines of code I got a demo-version of my revamped annotator up and running, but then I was told to take a look at SnpEff. The tool makes everything I was to implement in my own one, so if anyone ever wants to annotate SNPs with regard to genomic features they hit and possible effects, give SnpEff a try. It's really fast.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .