Skip to content
This repository has been archived by the owner on May 22, 2022. It is now read-only.

Annotation Features

greenify edited this page Dec 20, 2014 · 9 revisions

You can either import GFF3 or the Jalview feature format

The parser is implemented in biojs-io-gff.

Small gotchas

  • indexes start at 0

How to add features/annotations to the MSA

var xhr = msa.io.xhr;
var gff = msa.io.gff;
xhr("./data/fer1.gff3", function(err, request, body) {
  var features = gff.parseSeqs(body);
  msaInstance.seqs.addFeatures(features);
});
  • you can choose your favorite library to do the XHR-Request
  • you can add the features independently to the loading of the sequences
  • you can remove all features by msa.seqs.removeAllFeatures()
  • msa.io.xhr is the convenient form for require("xhr")
  • msa.io.gff is the convenient form for require("biojs-io-gff") `

Jalview feature format

domain	red
coil	cccccc
Your Own description here	FER_CAPAA	-1	3	93	domain
Your Own description here	FER_CAPAN	-1	48	144	chain
startgroup	secondarystucture
PDB secondary structure annotation	FER1_SPIOL	-1	52	59	strand
PDB secondary structure annotation	FER1_SPIOL	-1	74	80	helix
endgroup	secondarystructure
<description> <id> <sequenceIndex(opt.)> <start> <end> <type> <scopt(opt.)>
  • tab-separated file
  • this format doesn't allow comments
  • a sequence index of -1: access by ID

more

GFF3

##gff-version 3
ctg123 . gene            10  90  .  +  .  Name=EDEN;Color=green
ctg123 . TF_binding_site 20  32  .  +  .  Name=TF binding site;Color=red
ctg123 . mRNA            60  65  .  +  .  Name=EDEN.2;Color=blue
ctg123 . mRNA            13  40  .  +  .  Parent=gene00001;Name=EDEN.3;ID=mRNA00003
<id> <source(opt)> <type> <start> <stop> <score(opt)> <strand(opt)> <phase(opt)> <attributes(opt)>
  • tab-separated file
  • . is undefined
  • the header ##gff-version 3 is required
  • comments will be ignored
  • define
  • colors with Color
  • text with Name
  • Parent and ID are optional

more

Clone this wiki locally