1 package jalview.ext.ensembl;
3 import jalview.analysis.AlignmentUtils;
4 import jalview.datamodel.Alignment;
5 import jalview.datamodel.AlignmentI;
6 import jalview.datamodel.DBRefEntry;
7 import jalview.datamodel.DBRefSource;
8 import jalview.datamodel.Mapping;
9 import jalview.datamodel.SequenceFeature;
10 import jalview.datamodel.SequenceI;
11 import jalview.exceptions.JalviewException;
12 import jalview.io.FastaFile;
13 import jalview.io.FileParse;
14 import jalview.io.gff.SequenceOntology;
15 import jalview.schemes.ResidueProperties;
16 import jalview.util.DBRefUtils;
17 import jalview.util.MapList;
18 import jalview.util.MappingUtils;
19 import jalview.util.StringUtils;
21 import java.io.IOException;
22 import java.net.MalformedURLException;
24 import java.util.ArrayList;
25 import java.util.Arrays;
26 import java.util.Collections;
27 import java.util.Comparator;
28 import java.util.LinkedHashMap;
29 import java.util.List;
30 import java.util.Map.Entry;
33 * Base class for Ensembl sequence fetchers
37 public abstract class EnsemblSeqProxy extends EnsemblRestClient
39 protected static final String CONSEQUENCE_TYPE = "consequence_type";
41 protected static final String PARENT = "Parent";
43 protected static final String ID = "ID";
46 * this needs special handling, as it isA sequence_variant in the
47 * Sequence Ontology, but behaves in Ensembl as if it isA transcript
49 protected static final String NMD_VARIANT = "NMD_transcript_variant";
51 protected static final String NAME = "Name";
53 public enum EnsemblSeqType
56 * type=genomic for the full dna including introns
61 * type=cdna for transcribed dna including UTRs
66 * type=cds for coding dna excluding UTRs
71 * type=protein for the peptide product sequence
76 * the value of the 'type' parameter to fetch this version of
81 EnsemblSeqType(String t)
86 public String getType()
94 * A comparator to sort ranges into ascending start position order
96 private class RangeSorter implements Comparator<int[]>
100 RangeSorter(boolean forward)
106 public int compare(int[] o1, int[] o2)
108 return (forwards ? 1 : -1) * Integer.compare(o1[0], o2[0]);
116 public EnsemblSeqProxy()
121 * Makes the sequence queries to Ensembl's REST service and returns an
122 * alignment consisting of the returned sequences.
125 public AlignmentI getSequenceRecords(String query) throws Exception
127 long now = System.currentTimeMillis();
128 // TODO use a String... query vararg instead?
130 // danger: accession separator used as a regex here, a string elsewhere
131 // in this case it is ok (it is just a space), but (e.g.) '\' would not be
132 List<String> allIds = Arrays.asList(query
133 .split(getAccessionSeparator()));
134 AlignmentI alignment = null;
138 * execute queries, if necessary in batches of the
139 * maximum allowed number of ids
141 int maxQueryCount = getMaximumQueryCount();
142 for (int v = 0, vSize = allIds.size(); v < vSize; v += maxQueryCount)
144 int p = Math.min(vSize, v + maxQueryCount);
145 List<String> ids = allIds.subList(v, p);
148 alignment = fetchSequences(ids, alignment);
149 } catch (Throwable r)
152 String msg = "Aborting ID retrieval after " + v
153 + " chunks. Unexpected problem (" + r.getLocalizedMessage()
155 System.err.println(msg);
156 if (alignment != null)
158 break; // return what we got
162 throw new JalviewException(msg, r);
168 * fetch and transfer genomic sequence features,
169 * fetch protein product and add as cross-reference
171 for (String accId : allIds)
173 addFeaturesAndProduct(accId, alignment);
177 System.out.println(getClass().getName() + " took "
178 + (System.currentTimeMillis() - now) + "ms to fetch");
183 * Fetches Ensembl features using the /overlap REST endpoint, and adds them to
184 * the sequence in the alignment. Also fetches the protein product, maps it
185 * from the CDS features of the sequence, and saves it as a cross-reference of
191 protected void addFeaturesAndProduct(String accId, AlignmentI alignment)
193 if (alignment == null)
201 * get 'dummy' genomic sequence with exon, cds and variation features
203 SequenceI genomicSequence = null;
204 EnsemblOverlap gffFetcher = new EnsemblOverlap();
205 EnsemblFeatureType[] features = getFeaturesToFetch();
206 AlignmentI geneFeatures = gffFetcher.getSequenceRecords(accId,
208 if (geneFeatures.getHeight() > 0)
210 genomicSequence = geneFeatures.getSequenceAt(0);
212 if (genomicSequence != null)
215 * transfer features to the query sequence
217 SequenceI querySeq = alignment.findName(accId);
218 if (transferFeatures(accId, genomicSequence, querySeq))
222 * fetch and map protein product, and add it as a cross-reference
223 * of the retrieved sequence
225 addProteinProduct(querySeq);
228 } catch (IOException e)
230 System.err.println("Error transferring Ensembl features: "
236 * Returns those sequence feature types to fetch from Ensembl. We may want
237 * features either because they are of interest to the user, or as means to
238 * identify the locations of the sequence on the genomic sequence (CDS
239 * features identify CDS, exon features identify cDNA etc).
243 protected abstract EnsemblFeatureType[] getFeaturesToFetch();
246 * Fetches and maps the protein product, and adds it as a cross-reference of
247 * the retrieved sequence
249 protected void addProteinProduct(SequenceI querySeq)
251 String accId = querySeq.getName();
254 AlignmentI protein = new EnsemblProtein().getSequenceRecords(accId);
255 if (protein == null || protein.getHeight() == 0)
257 System.out.println("Failed to retrieve protein for " + accId);
260 SequenceI proteinSeq = protein.getSequenceAt(0);
263 * need dataset sequences (to be the subject of mappings)
265 proteinSeq.createDatasetSequence();
266 querySeq.createDatasetSequence();
268 getProteinCrossReferences(proteinSeq);
270 MapList mapList = mapCdsToProtein(querySeq, proteinSeq);
273 Mapping map = new Mapping(proteinSeq.getDatasetSequence(), mapList);
274 DBRefEntry dbr = new DBRefEntry(getDbSource(), getDbVersion(),
276 querySeq.getDatasetSequence().addDBRef(dbr);
279 * compute peptide variants from dna variants and add as
280 * sequence features on the protein sequence ta-da
282 computeProteinFeatures(querySeq, proteinSeq, mapList);
284 } catch (Exception e)
287 .println(String.format("Error retrieving protein for %s: %s",
288 accId, e.getMessage()));
293 * Get Uniprot and PDB xrefs from Ensembl, and attach them to the protein
298 protected void getProteinCrossReferences(SequenceI proteinSeq)
300 while (proteinSeq.getDatasetSequence() != null)
302 proteinSeq = proteinSeq.getDatasetSequence();
305 EnsemblXref xrefFetcher = new EnsemblXref();
306 List<DBRefEntry> xrefs = xrefFetcher.getCrossReferences(
307 proteinSeq.getName(), "PDB", "Uniprot/SPTREMBL",
308 "Uniprot/SWISSPROT");
309 for (DBRefEntry xref : xrefs)
311 proteinSeq.addDBRef(xref);
316 * Returns a mapping from dna to protein by inspecting sequence features of
317 * type "CDS" on the dna.
323 protected MapList mapCdsToProtein(SequenceI dnaSeq, SequenceI proteinSeq)
325 List<int[]> ranges = new ArrayList<int[]>(50);
327 int mappedDnaLength = getCdsRanges(dnaSeq, ranges);
329 int proteinLength = proteinSeq.getLength();
330 List<int[]> proteinRange = new ArrayList<int[]>();
331 int proteinStart = 1;
334 * incomplete start codon may mean X at start of peptide
335 * we ignore both for mapping purposes
337 if (proteinSeq.getCharAt(0) == 'X')
342 proteinRange.add(new int[] { proteinStart, proteinLength });
345 * dna length should map to protein (or protein plus stop codon)
347 int codesForResidues = mappedDnaLength / 3;
348 if (codesForResidues == proteinLength
349 || codesForResidues == (proteinLength + 1))
351 return new MapList(ranges, proteinRange, 3, 1);
357 * Adds CDS ranges to the ranges list, and returns the total length mapped.
359 * No need to worry about reverse strand dna here since the retrieved sequence
360 * is as transcribed (reverse complement for reverse strand), i.e in the same
361 * sense as the peptide.
367 protected int getCdsRanges(SequenceI dnaSeq, List<int[]> ranges)
369 SequenceFeature[] sfs = dnaSeq.getSequenceFeatures();
374 int mappedDnaLength = 0;
375 for (SequenceFeature sf : sfs)
378 * process a CDS feature (or a sub-type of CDS)
380 if (SequenceOntology.getInstance().isA(sf.getType(), SequenceOntology.CDS))
384 phase = Integer.parseInt(sf.getPhase());
385 } catch (NumberFormatException e)
390 * phase > 0 on first codon means 5' incomplete - skip to the start
391 * of the next codon; example ENST00000496384
393 int begin = sf.getBegin();
394 int end = sf.getEnd();
395 if (ranges.isEmpty() && phase > 0)
400 continue; // shouldn't happen?
403 ranges.add(new int[] { begin, end });
404 mappedDnaLength += Math.abs(end - begin) + 1;
407 return mappedDnaLength;
411 * Fetches sequences for the list of accession ids and adds them to the
412 * alignment. Returns the extended (or created) alignment.
417 * @throws JalviewException
418 * @throws IOException
420 protected AlignmentI fetchSequences(List<String> ids, AlignmentI alignment)
421 throws JalviewException, IOException
423 if (!isEnsemblAvailable())
426 throw new JalviewException("ENSEMBL Rest API not available.");
428 FileParse fp = getSequenceReader(ids);
429 FastaFile fr = new FastaFile(fp);
430 if (fr.hasWarningMessage())
432 System.out.println(String.format(
433 "Warning when retrieving %d ids %s\n%s", ids.size(),
434 ids.toString(), fr.getWarningMessage()));
436 else if (fr.getSeqs().size() != ids.size())
438 System.out.println(String.format(
439 "Only retrieved %d sequences for %d query strings", fr
440 .getSeqs().size(), ids.size()));
443 if (fr.getSeqs().size() == 1 && fr.getSeqs().get(0).getLength() == 0)
446 * POST request has returned an empty FASTA file e.g. for invalid id
448 throw new IOException("No data returned for " + ids);
451 if (fr.getSeqs().size() > 0)
453 AlignmentI seqal = new Alignment(
454 fr.getSeqsAsArray());
455 for (SequenceI sq:seqal.getSequences())
457 if (sq.getDescription() == null)
459 sq.setDescription(getDbName());
461 String name = sq.getName();
462 if (ids.contains(name)
463 || ids.contains(name.replace("ENSP", "ENST")))
465 DBRefUtils.parseToDbRef(sq, DBRefSource.ENSEMBL, "0", name);
468 if (alignment == null)
474 alignment.append(seqal);
481 * Returns the URL for the REST call
484 * @throws MalformedURLException
487 protected URL getUrl(List<String> ids) throws MalformedURLException
490 * a single id is included in the URL path
491 * multiple ids go in the POST body instead
493 StringBuffer urlstring = new StringBuffer(128);
494 urlstring.append(SEQUENCE_ID_URL);
497 urlstring.append("/").append(ids.get(0));
499 // @see https://github.com/Ensembl/ensembl-rest/wiki/Output-formats
500 urlstring.append("?type=").append(getSourceEnsemblType().getType());
501 urlstring.append(("&Accept=text/x-fasta"));
503 URL url = new URL(urlstring.toString());
508 * A sequence/id POST request currently allows up to 50 queries
510 * @see http://rest.ensembl.org/documentation/info/sequence_id_post
513 public int getMaximumQueryCount()
519 protected boolean useGetRequest()
525 protected String getRequestMimeType(boolean multipleIds)
527 return multipleIds ? "application/json" : "text/x-fasta";
531 protected String getResponseMimeType()
533 return "text/x-fasta";
538 * @return the configured sequence return type for this source
540 protected abstract EnsemblSeqType getSourceEnsemblType();
543 * Returns a list of [start, end] genomic ranges corresponding to the sequence
546 * The correspondence between the frames of reference is made by locating
547 * those features on the genomic sequence which identify the retrieved
548 * sequence. Specifically
550 * <li>genomic sequence is identified by "transcript" features with
551 * ID=transcript:transcriptId</li>
552 * <li>cdna sequence is identified by "exon" features with
553 * Parent=transcript:transcriptId</li>
554 * <li>cds sequence is identified by "CDS" features with
555 * Parent=transcript:transcriptId</li>
558 * The returned ranges are sorted to run forwards (for positive strand) or
559 * backwards (for negative strand). Aborts and returns null if both positive
560 * and negative strand are found (this should not normally happen).
562 * @param sourceSequence
565 * the start position of the sequence we are mapping to
568 protected MapList getGenomicRanges(SequenceI sourceSequence,
569 String accId, int start)
571 SequenceFeature[] sfs = sourceSequence.getSequenceFeatures();
578 * generously initial size for number of cds regions
579 * (worst case titin Q8WZ42 has c. 313 exons)
581 List<int[]> regions = new ArrayList<int[]>(100);
582 int mappedLength = 0;
583 int direction = 1; // forward
584 boolean directionSet = false;
586 for (SequenceFeature sf : sfs)
589 * accept the target feature type or a specialisation of it
590 * (e.g. coding_exon for exon)
592 if (identifiesSequence(sf, accId))
594 int strand = sf.getStrand();
596 if (directionSet && strand != direction)
598 // abort - mix of forward and backward
599 System.err.println("Error: forward and backward strand for "
607 * add to CDS ranges, semi-sorted forwards/backwards
611 regions.add(0, new int[] { sf.getEnd(), sf.getBegin() });
615 regions.add(new int[] { sf.getBegin(), sf.getEnd() });
617 mappedLength += Math.abs(sf.getEnd() - sf.getBegin() + 1);
622 * 'gene' sequence is contiguous so we can stop as soon as its
623 * identifying feature has been found
630 if (regions.isEmpty())
632 System.out.println("Failed to identify target sequence for " + accId
633 + " from genomic features");
638 * a final sort is needed since Ensembl returns CDS sorted within source
639 * (havana / ensembl_havana)
641 Collections.sort(regions, new RangeSorter(direction == 1));
643 List<int[]> to = new ArrayList<int[]>();
644 to.add(new int[] { start, start + mappedLength - 1 });
646 return new MapList(regions, to, 1, 1);
650 * Answers true if the sequence being retrieved may occupy discontiguous
651 * regions on the genomic sequence.
653 protected boolean isSpliceable()
659 * Returns true if the sequence feature marks positions of the genomic
660 * sequence feature which are within the sequence being retrieved. For
661 * example, an 'exon' feature whose parent is the target transcript marks the
662 * cdna positions of the transcript.
668 protected abstract boolean identifiesSequence(SequenceFeature sf,
672 * Transfers the sequence feature to the target sequence, locating its start
673 * and end range based on the mapping. Features which do not overlap the
674 * target sequence are ignored.
677 * @param targetSequence
679 * mapping from the sequence feature's coordinates to the target
682 protected void transferFeature(SequenceFeature sf,
683 SequenceI targetSequence, MapList mapping)
685 int start = sf.getBegin();
686 int end = sf.getEnd();
687 int[] mappedRange = mapping.locateInTo(start, end);
689 if (mappedRange != null)
691 SequenceFeature copy = new SequenceFeature(sf);
692 copy.setBegin(Math.min(mappedRange[0], mappedRange[1]));
693 copy.setEnd(Math.max(mappedRange[0], mappedRange[1]));
694 targetSequence.addSequenceFeature(copy);
697 * for sequence_variant, make an additional feature with consequence
699 if (SequenceOntology.getInstance().isSequenceVariant(sf.getType()))
701 String consequence = (String) sf.getValue(CONSEQUENCE_TYPE);
702 if (consequence != null)
704 SequenceFeature sf2 = new SequenceFeature("consequence",
705 consequence, copy.getBegin(), copy.getEnd(), 0f,
707 targetSequence.addSequenceFeature(sf2);
714 * Transfers features from sourceSequence to targetSequence
717 * @param sourceSequence
718 * @param targetSequence
719 * @return true if any features were transferred, else false
721 protected boolean transferFeatures(String accessionId,
722 SequenceI sourceSequence, SequenceI targetSequence)
724 if (sourceSequence == null || targetSequence == null)
729 SequenceFeature[] sfs = sourceSequence.getSequenceFeatures();
730 MapList mapping = getGenomicRanges(sourceSequence, accessionId,
731 targetSequence.getStart());
737 return transferFeatures(sfs, targetSequence, mapping, accessionId);
741 * Transfer features to the target sequence. The start/end positions are
742 * converted using the mapping. Features which do not overlap are ignored.
743 * Features whose parent is not the specified identifier are also ignored.
746 * @param targetSequence
751 protected boolean transferFeatures(SequenceFeature[] features,
752 SequenceI targetSequence, MapList mapping, String parentId)
754 final boolean forwardStrand = mapping.isFromForwardStrand();
757 * sort features by start position (descending if reverse strand)
758 * before transferring (in forwards order) to the target sequence
760 Arrays.sort(features, new Comparator<SequenceFeature>()
763 public int compare(SequenceFeature o1, SequenceFeature o2)
765 int c = Integer.compare(o1.getBegin(), o2.getBegin());
766 return forwardStrand ? c : -c;
770 boolean transferred = false;
771 for (SequenceFeature sf : features)
773 if (retainFeature(sf, parentId))
775 transferFeature(sf, targetSequence, mapping);
783 * Answers true if the feature type is one we want to keep for the sequence.
784 * Some features are only retrieved in order to identify the sequence range,
785 * and may then be discarded as redundant information (e.g. "CDS" feature for
788 @SuppressWarnings("unused")
789 protected boolean retainFeature(SequenceFeature sf, String accessionId)
791 return true; // override as required
795 * Answers true if the feature has a Parent which refers to the given
796 * accession id, or if the feature has no parent. Answers false if the
797 * feature's Parent is for a different accession id.
803 protected boolean featureMayBelong(SequenceFeature sf, String identifier)
805 String parent = (String) sf.getValue(PARENT);
806 // using contains to allow for prefix "gene:", "transcript:" etc
807 if (parent != null && !parent.contains(identifier))
809 // this genomic feature belongs to a different transcript
816 public String getDescription()
818 return "Ensembl " + getSourceEnsemblType().getType()
819 + " sequence with variant features";
823 * Returns a (possibly empty) list of features on the sequence which have the
824 * specified sequence ontology type (or a sub-type of it), and the given
825 * identifier as parent
832 protected List<SequenceFeature> findFeatures(SequenceI sequence,
833 String type, String parentId)
835 List<SequenceFeature> result = new ArrayList<SequenceFeature>();
837 SequenceFeature[] sfs = sequence.getSequenceFeatures();
839 SequenceOntology so = SequenceOntology.getInstance();
840 for (SequenceFeature sf :sfs) {
841 if (so.isA(sf.getType(), type))
843 String parent = (String) sf.getValue(PARENT);
844 if (parent.equals(parentId))
855 * Maps exon features from dna to protein, and computes variants in peptide
856 * product generated by variants in dna, and adds them as sequence_variant
857 * features on the protein sequence. Returns the number of variant features
862 * @param dnaToProtein
864 static int computeProteinFeatures(SequenceI dnaSeq,
865 SequenceI peptide, MapList dnaToProtein)
867 while (dnaSeq.getDatasetSequence() != null)
869 dnaSeq = dnaSeq.getDatasetSequence();
871 while (peptide.getDatasetSequence() != null)
873 peptide = peptide.getDatasetSequence();
876 AlignmentUtils.transferFeatures(dnaSeq, peptide, dnaToProtein,
877 SequenceOntology.EXON);
879 LinkedHashMap<Integer, String[][]> variants = buildDnaVariantsMap(
880 dnaSeq, dnaToProtein);
883 * scan codon variations, compute peptide variants and add to peptide sequence
886 for (Entry<Integer, String[][]> variant : variants.entrySet())
888 int peptidePos = variant.getKey();
889 String[][] codonVariants = variant.getValue();
890 String residue = String.valueOf(peptide.getCharAt(peptidePos - 1)); // 0-based
891 List<String> peptideVariants = computePeptideVariants(codonVariants,
893 if (!peptideVariants.isEmpty())
895 String desc = StringUtils.listToDelimitedString(peptideVariants,
897 SequenceFeature sf = new SequenceFeature(
898 SequenceOntology.SEQUENCE_VARIANT, desc, peptidePos,
899 peptidePos, 0f, null);
900 peptide.addSequenceFeature(sf);
908 * Builds a map whose key is position in the protein sequence, and value is an
909 * array of all variants for the coding codon positions
912 * @param dnaToProtein
915 static LinkedHashMap<Integer, String[][]> buildDnaVariantsMap(
916 SequenceI dnaSeq, MapList dnaToProtein)
919 * map from peptide position to all variant features of the codon for it
920 * LinkedHashMap ensures we add the peptide features in sequence order
922 LinkedHashMap<Integer, String[][]> variants = new LinkedHashMap<Integer, String[][]>();
923 SequenceOntology so = SequenceOntology.getInstance();
925 SequenceFeature[] dnaFeatures = dnaSeq.getSequenceFeatures();
926 if (dnaFeatures == null)
931 int dnaStart = dnaSeq.getStart();
932 int[] lastCodon = null;
933 int lastPeptidePostion = 0;
936 * build a map of codon variations for peptides
938 for (SequenceFeature sf : dnaFeatures)
940 int dnaCol = sf.getBegin();
941 if (dnaCol != sf.getEnd())
943 // not handling multi-locus variant features
946 if (so.isSequenceVariant(sf.getType()))
948 int[] mapsTo = dnaToProtein.locateInTo(dnaCol, dnaCol);
951 // feature doesn't lie within coding region
954 int peptidePosition = mapsTo[0];
955 String[][] codonVariants = variants.get(peptidePosition);
956 if (codonVariants == null)
958 codonVariants = new String[3][];
959 variants.put(peptidePosition, codonVariants);
963 * extract dna variants to a string array
965 String alls = (String) sf.getValue("alleles");
970 String[] alleles = alls.split(",");
973 * get this peptides codon positions e.g. [3, 4, 5] or [4, 7, 10]
975 int[] codon = peptidePosition == lastPeptidePostion ? lastCodon
976 : MappingUtils.flattenRanges(dnaToProtein.locateInFrom(
977 peptidePosition, peptidePosition));
978 lastPeptidePostion = peptidePosition;
982 * save nucleotide (and this variant) for each codon position
984 for (int codonPos = 0; codonPos < 3; codonPos++)
986 String nucleotide = String.valueOf(dnaSeq
987 .getCharAt(codon[codonPos] - dnaStart));
988 if (codon[codonPos] == dnaCol)
991 * record current dna base and its alleles
993 String[] dnaVariants = new String[alleles.length + 1];
994 dnaVariants[0] = nucleotide;
995 System.arraycopy(alleles, 0, dnaVariants, 1, alleles.length);
996 codonVariants[codonPos] = dnaVariants;
998 else if (codonVariants[codonPos] == null)
1001 * record current dna base only
1002 * (at least until we find any variation and overwrite it)
1004 codonVariants[codonPos] = new String[] { nucleotide };
1013 * Returns a sorted, non-redundant list of all peptide translations generated
1014 * by the given dna variants, excluding the current residue value
1016 * @param codonVariants
1017 * an array of base values (acgtACGT) for codon positions 1, 2, 3
1019 * the current residue translation
1022 static List<String> computePeptideVariants(
1023 String[][] codonVariants, String residue)
1025 List<String> result = new ArrayList<String>();
1026 for (String base1 : codonVariants[0])
1028 for (String base2 : codonVariants[1])
1030 for (String base3 : codonVariants[2])
1032 String codon = base1 + base2 + base3;
1033 // TODO: report frameshift/insertion/deletion
1034 // and multiple-base variants?!
1035 String peptide = codon.contains("-") ? "-" : ResidueProperties
1036 .codonTranslate(codon);
1037 if (peptide != null && !result.contains(peptide)
1038 && !peptide.equalsIgnoreCase(residue))
1040 result.add(peptide);
1047 * sort alphabetically with STOP at the end
1049 Collections.sort(result, new Comparator<String>()
1053 public int compare(String o1, String o2)
1055 if ("STOP".equals(o1))
1059 else if ("STOP".equals(o2))
1065 return o1.compareTo(o2);
1073 * Answers true if the feature type is either 'NMD_transcript_variant' or
1074 * 'transcript' or one of its sub-types in the Sequence Ontology. This is
1075 * needed because NMD_transcript_variant behaves like 'transcript' in Ensembl
1076 * although strictly speaking it is not (it is a sub-type of
1077 * sequence_variant).
1079 * @param featureType
1082 public static boolean isTranscript(String featureType)
1084 return NMD_VARIANT.equals(featureType)
1085 || SequenceOntology.getInstance().isA(featureType, SequenceOntology.TRANSCRIPT);