import jalview.datamodel.AlignedCodon;
import jalview.datamodel.AlignedCodonFrame;
-import jalview.datamodel.AlignedCodonFrame.SequenceToSequenceMapping;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.datamodel.SequenceMapping;
import jalview.datamodel.features.SequenceFeatures;
import jalview.io.gff.Gff3Helper;
import jalview.io.gff.SequenceOntologyI;
.findMappingsForSequence(proteinProduct, mappings);
for (AlignedCodonFrame acf : mappingsToPeptide)
{
- for (SequenceToSequenceMapping map : acf.getMappings())
+ for (SequenceMapping map : acf.getMappings())
{
Mapping mapping = map.getMapping();
if (mapping != aMapping
public class AlignedCodonFrame
{
- /*
- * Data bean to hold mappings from one sequence to another
- */
- public class SequenceToSequenceMapping
- {
- private SequenceI fromSeq;
-
- private Mapping mapping;
-
- SequenceToSequenceMapping(SequenceI from, Mapping map)
- {
- this.fromSeq = from;
- this.mapping = map;
- }
-
- /**
- * Readable representation for debugging only, not guaranteed not to change
- */
- @Override
- public String toString()
- {
- return String.format("From %s %s", fromSeq.getName(),
- mapping.toString());
- }
-
- /**
- * Returns a hashCode derived from the hashcodes of the mappings and fromSeq
- *
- * @see SequenceToSequenceMapping#hashCode()
- */
- @Override
- public int hashCode()
- {
- return (fromSeq == null ? 0 : fromSeq.hashCode() * 31)
- + mapping.hashCode();
- }
-
- /**
- * Answers true if the objects hold the same mapping between the same two
- * sequences
- *
- * @see Mapping#equals
- */
- @Override
- public boolean equals(Object obj)
- {
- if (!(obj instanceof SequenceToSequenceMapping))
- {
- return false;
- }
- SequenceToSequenceMapping that = (SequenceToSequenceMapping) obj;
- if (this.mapping == null)
- {
- return that.mapping == null;
- }
- // TODO: can simplify by asserting fromSeq is a dataset sequence
- return (this.fromSeq == that.fromSeq
- || (this.fromSeq != null && that.fromSeq != null
- && this.fromSeq.getDatasetSequence() != null
- && this.fromSeq.getDatasetSequence() == that.fromSeq
- .getDatasetSequence()))
- && this.mapping.equals(that.mapping);
- }
-
- public SequenceI getFromSeq()
- {
- return fromSeq;
- }
-
- public Mapping getMapping()
- {
- return mapping;
- }
- }
-
- private List<SequenceToSequenceMapping> mappings;
+ private List<SequenceMapping> mappings;
/**
* Constructor
* note that 'adding' a duplicate map does nothing; this protects against
* creating duplicate mappings in AlignedCodonFrame
*/
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
if (ssm.fromSeq == fromSeq && ssm.mapping.to == toSeq)
{
*/
Mapping mp = new Mapping(toSeq, map);
mp.setMappedFromId(mapFromId);
- mappings.add(new SequenceToSequenceMapping(fromSeq, mp));
+ mappings.add(new SequenceMapping(fromSeq, mp));
}
public SequenceI[] getdnaSeqs()
// TODO return a list instead?
// return dnaSeqs;
List<SequenceI> seqs = new ArrayList<>();
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
seqs.add(ssm.fromSeq);
}
{
// TODO not used - remove?
List<SequenceI> seqs = new ArrayList<>();
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
seqs.add(ssm.mapping.to);
}
public MapList[] getdnaToProt()
{
List<MapList> maps = new ArrayList<>();
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
maps.add(ssm.mapping.map);
}
public Mapping[] getProtMappings()
{
List<Mapping> maps = new ArrayList<>();
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
maps.add(ssm.mapping);
}
SequenceI seqDs = seq.getDatasetSequence();
seqDs = seqDs != null ? seqDs : seq;
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
if (ssm.fromSeq == seqDs || ssm.mapping.to == seqDs)
{
public SequenceI getAaForDnaSeq(SequenceI dnaSeqRef)
{
SequenceI dnads = dnaSeqRef.getDatasetSequence();
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
if (ssm.fromSeq == dnaSeqRef || ssm.fromSeq == dnads)
{
public SequenceI getDnaForAaSeq(SequenceI aaSeqRef)
{
SequenceI aads = aaSeqRef.getDatasetSequence();
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
if (ssm.mapping.to == aaSeqRef || ssm.mapping.to == aads)
{
{
int[] codon;
SequenceI ds = seq.getDatasetSequence();
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
if (ssm.fromSeq == seq || ssm.fromSeq == ds)
{
*/
MapList ml = null;
int i = 0;
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
if (ssm.fromSeq == seq)
{
/*
* Search mapped protein ('to') sequences first.
*/
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
if (ssm.fromSeq == seq || ssm.fromSeq == seq.getDatasetSequence())
{
/*
* Then try mapped dna sequences.
*/
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
if (ssm.mapping.to == seq
|| ssm.mapping.to == seq.getDatasetSequence())
{
return null;
}
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
/*
* try mapping from target to query
SequenceI dnaSeq = null;
List<char[]> result = new ArrayList<>();
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
if (ssm.mapping.to == protein
&& ssm.mapping.getMap().getFromRatio() == 3)
SequenceI seqDs = seq.getDatasetSequence();
seqDs = seqDs != null ? seqDs : seq;
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
final Mapping mapping = ssm.mapping;
if (ssm.fromSeq == seqDs)
/*
* check for replaceable DNA ('map from') sequences
*/
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
{
SequenceI dna = ssm.fromSeq;
if (dna instanceof SequenceDummy
}
SequenceI ds = seq.getDatasetSequence();
- for (SequenceToSequenceMapping ssm : mappings)
+ for (SequenceMapping ssm : mappings)
/*
* 'from' sequences
*/
SequenceI dssTo = toSeq.getDatasetSequence() == null ? toSeq
: toSeq.getDatasetSequence();
- for (SequenceToSequenceMapping mapping : mappings)
+ for (SequenceMapping mapping : mappings)
{
SequenceI from = mapping.fromSeq;
SequenceI to = mapping.mapping.to;
/**
* Returns a hashcode derived from the list of sequence mappings
*
- * @see SequenceToSequenceMapping#hashCode()
+ * @see SequenceMapping#hashCode()
* @see AbstractList#hashCode()
*/
@Override
return this.mappings.equals(((AlignedCodonFrame) obj).mappings);
}
- public List<SequenceToSequenceMapping> getMappings()
+ public List<SequenceMapping> getMappings()
{
return mappings;
}
package jalview.datamodel;
import jalview.analysis.AlignmentUtils;
-import jalview.datamodel.AlignedCodonFrame.SequenceToSequenceMapping;
import jalview.io.FastaFile;
import jalview.util.Comparison;
import jalview.util.LinkedIdentityHashSet;
// verify all mappings are in dataset
for (AlignedCodonFrame cf : codonFrameList)
{
- for (SequenceToSequenceMapping ssm : cf.getMappings())
+ for (SequenceMapping ssm : cf.getMappings())
{
if (!seqs.contains(ssm.getFromSeq()))
{
/**
* An enumeration of the kinds of mapping (from nucleotide or peptide, to
- * nucleotide or peptide), and the corresponding word lengths
+ * nucleotide or peptide), and the corresponding word lengths. This is based on,
+ * but extends (and renames) the values used by Exonerate.
+ *
+ * @see https://www.ebi.ac.uk/about/vertebrate-genomics/software/exonerate-manual
*/
public enum MappingType
{
- NucleotideToPeptide(3, 1)
- {
- @Override
- public MappingType getInverse()
- {
- return PeptideToNucleotide;
- }
- },
- PeptideToNucleotide(1, 3)
- {
- @Override
- public MappingType getInverse()
- {
- return NucleotideToPeptide;
- }
- },
- NucleotideToNucleotide(1, 1)
- {
- @Override
- public MappingType getInverse()
- {
- return NucleotideToNucleotide;
- }
- },
- PeptideToPeptide(1, 1)
- {
- @Override
- public MappingType getInverse()
- {
- return PeptideToPeptide;
- }
- };
+ GenomeToCdna(1, 1), CdnaToGenome(1, 1), GenomeToCds(1, 1),
+ CdsToGenome(1, 1), CdnaToCds(1, 1), CdsToCdna(1, 1),
+ GenomeToPeptide(3, 1), PeptideToGenome(1, 3), CdnaToPeptide(3, 1),
+ PeptideToCdna(1, 3), CdsToPeptide(3, 1), PeptideToCds(1, 3);
private int fromRatio;
toRatio = toSize;
}
- public abstract MappingType getInverse();
-
+ /**
+ * Answers the number of positions each 'word' maps from (e.g. 3 when mapping
+ * from codons in nucleotide to peptide residues)
+ *
+ * @return
+ */
public int getFromRatio()
{
return fromRatio;
}
+ /**
+ * Answers the number of positions each 'word' maps to (e.g. 3 when mapping
+ * from peptide residues to codons in nucleotide)
+ *
+ * @return
+ */
public int getToRatio()
{
return toRatio;
}
+
+ /**
+ * Answers true if the mapping is from nucleotide to peptide, else false
+ *
+ * @param type
+ * @return
+ */
+ public static boolean isDnaToPeptide(MappingType type)
+ {
+ return type != null && type.getFromRatio() == 3
+ && type.getToRatio() == 1;
+ }
+
+ /**
+ * Answers true if the mapping is from peptide to nucleotide, else false
+ *
+ * @param type
+ * @return
+ */
+ public static boolean isPeptideToDna(MappingType type)
+ {
+ return type != null && type.getFromRatio() == 1
+ && type.getToRatio() == 3;
+ }
}
--- /dev/null
+package jalview.datamodel;
+
+/**
+ * Data bean that holds a mapping from one sequence to another
+ */
+public class SequenceMapping
+{
+ SequenceI fromSeq;
+
+ Mapping mapping;
+
+ private MappingType type;
+
+ SequenceMapping(SequenceI from, Mapping map)
+ {
+ this.fromSeq = from;
+ this.mapping = map;
+ }
+
+ /**
+ * Readable representation for debugging only, not guaranteed not to change
+ */
+ @Override
+ public String toString()
+ {
+ return String.format("From %s %s", fromSeq.getName(),
+ mapping.toString());
+ }
+
+ /**
+ * Returns a hashCode derived from the hashcodes of the mappings and fromSeq
+ *
+ * @see SequenceMapping#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ return (fromSeq == null ? 0 : fromSeq.hashCode() * 31)
+ + mapping.hashCode();
+ }
+
+ /**
+ * Answers true if the objects hold the same mapping between the same two
+ * sequences
+ *
+ * @see Mapping#equals
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (!(obj instanceof SequenceMapping))
+ {
+ return false;
+ }
+ SequenceMapping that = (SequenceMapping) obj;
+ if (this.mapping == null)
+ {
+ return that.mapping == null;
+ }
+ // TODO: can simplify by asserting fromSeq is a dataset sequence
+ return (this.fromSeq == that.fromSeq
+ || (this.fromSeq != null && that.fromSeq != null
+ && this.fromSeq.getDatasetSequence() != null
+ && this.fromSeq.getDatasetSequence() == that.fromSeq
+ .getDatasetSequence()))
+ && this.mapping.equals(that.mapping);
+ }
+
+ public SequenceI getFromSeq()
+ {
+ return fromSeq;
+ }
+
+ public Mapping getMapping()
+ {
+ return mapping;
+ }
+
+ public MappingType getType()
+ {
+ return type;
+ }
+}
\ No newline at end of file
--- /dev/null
+package jalview.datamodel;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * A singleton object that holds all mappings between sequences
+ *
+ * @author gmcarstairs
+ *
+ */
+public class SequenceMappings
+{
+ private static SequenceMappings instance;
+
+ private Map<SequenceI, List<SequenceMapping>> mappingsFrom;
+
+ private Map<SequenceI, List<SequenceMapping>> mappingsTo;
+
+ /**
+ * Non-instantiable class
+ */
+ private SequenceMappings()
+ {
+ mappingsFrom = new HashMap<>();
+ mappingsTo = new HashMap<>();
+ }
+
+ /**
+ * Answers the singleton instance of this class
+ *
+ * @return
+ */
+ public SequenceMappings getInstance()
+ {
+ return instance;
+ }
+
+ /**
+ * Answers a (possibly empty) unmodifiable list of mappings from the given
+ * sequence
+ *
+ * @param seq
+ * @return
+ */
+ public List<SequenceMapping> getMappingsFromSequence(SequenceI seq)
+ {
+ List<SequenceMapping> from = mappingsFrom.get(seq);
+ return from == null ? Collections.emptyList()
+ : Collections.unmodifiableList(from);
+ }
+
+ /**
+ * Answers a (possibly empty) unmodifiable list of mappings to the given
+ * sequence
+ *
+ * @param seq
+ * @return
+ */
+ public List<SequenceMapping> getMappingsToSequence(SequenceI seq)
+ {
+ List<SequenceMapping> from = mappingsTo.get(seq);
+ return from == null ? Collections.emptyList()
+ : Collections.unmodifiableList(from);
+ }
+
+ /**
+ * Answers a (possibly empty) list of mappings from the given sequence to its
+ * complement(s), defined as mappings that are either CdsToPeptide or
+ * PeptideToCds
+ *
+ * @param seq
+ * @return
+ */
+ public List<SequenceMapping> getMappingsToComplement(SequenceI seq)
+ {
+ List<SequenceMapping> from = mappingsTo.get(seq);
+ List<SequenceMapping> result = new ArrayList<>();
+ for (SequenceMapping mapping : from)
+ {
+ MappingType type = mapping.getType();
+ }
+ return result;
+ }
+}
*/
SequenceI mapFromSequence = seq;
SequenceI mapToSequence = mappedSequence;
- if ((type == MappingType.NucleotideToPeptide && featureIsOnTarget)
- || (type == MappingType.PeptideToNucleotide
- && !featureIsOnTarget))
+ if ((MappingType.isDnaToPeptide(type) && featureIsOnTarget)
+ || (MappingType.isPeptideToDna(type) && !featureIsOnTarget))
{
mapFromSequence = mappedSequence;
mapToSequence = seq;
}
/**
- * Returns a MappingType depending on the exonerate 'model' value.
+ * Returns a MappingType depending on the exonerate 'model' value
*
* @param model
* @return
{
MappingType result = null;
- if (model.contains(PROTEIN2DNA) || model.contains(PROTEIN2GENOME))
+ if (model.contains(PROTEIN2GENOME))
{
- result = MappingType.PeptideToNucleotide;
+ result = MappingType.PeptideToGenome;
}
- else if (model.contains(CODING2CODING) || model.contains(CODING2GENOME)
- || model.contains(CDNA2GENOME) || model.contains(GENOME2GENOME))
+ else if (model.contains(PROTEIN2DNA))
{
- result = MappingType.NucleotideToNucleotide;
+ result = MappingType.PeptideToCds;
+ }
+ else if (model.contains(CODING2GENOME))
+ {
+ result = MappingType.CdsToGenome;
+ }
+ else if (model.contains(CDNA2GENOME))
+ {
+ result = MappingType.CdnaToGenome;
+ }
+ else if (model.contains(CODING2CODING) || model.contains(GENOME2GENOME))
+ {
+ result = MappingType.GenomeToCdna;
}
return result;
}
int fromStart = Integer.parseInt(gffColumns[START_COL]);
int fromEnd = Integer.parseInt(gffColumns[END_COL]);
MapList mapping = constructMappingFromAlign(fromStart, fromEnd,
- toStart, toEnd, MappingType.NucleotideToNucleotide);
+ toStart, toEnd, MappingType.GenomeToCdna);
if (mapping != null)
{
int[] to = new int[] { toStart, toEnd };
/*
- * Jalview always models from dna to protein, so switch values if the
- * GFF mapping is from protein to dna
+ * Jalview always models from dna to protein, so invert
+ * mapping if the GFF mapping is from protein to dna
*/
- if (mappingType == MappingType.PeptideToNucleotide)
+ if (MappingType.isPeptideToDna(mappingType))
{
int[] temp = from;
from = to;
to = temp;
- mappingType = mappingType.getInverse();
+ mappingType = MappingType.CdsToPeptide;
}
int fromRatio = mappingType.getFromRatio();
String namesDelimiter, char nameValueSeparator,
String valuesDelimiter)
{
- Map<String, List<String>> map = new HashMap<String, List<String>>();
+ Map<String, List<String>> map = new HashMap<>();
if (text == null || text.trim().length() == 0)
{
return map;
List<String> vals = map.get(key);
if (vals == null)
{
- vals = new ArrayList<String>();
+ vals = new ArrayList<>();
map.put(key, vals);
}
for (String val : values.split(valuesDelimiter))
import static org.testng.AssertJUnit.assertTrue;
import jalview.datamodel.AlignedCodonFrame;
-import jalview.datamodel.AlignedCodonFrame.SequenceToSequenceMapping;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
+import jalview.datamodel.SequenceMapping;
import jalview.gui.JvOptionPane;
import jalview.util.DBRefUtils;
import jalview.util.MapList;
assertEquals(1, result.size());
assertSame(dna1, result.get(0));
// should now have a mapping from dna to pep1
- List<SequenceToSequenceMapping> mappings = acf.getMappings();
+ List<SequenceMapping> mappings = acf.getMappings();
assertEquals(1, mappings.size());
- SequenceToSequenceMapping mapping = mappings.get(0);
+ SequenceMapping mapping = mappings.get(0);
assertSame(dna1, mapping.getFromSeq());
assertSame(pep1, mapping.getMapping().getTo());
MapList mapList = mapping.getMapping().getMap();
import static org.testng.AssertJUnit.assertTrue;
import jalview.analysis.AlignmentGenerator;
-import jalview.datamodel.AlignedCodonFrame.SequenceToSequenceMapping;
import jalview.gui.JvOptionPane;
import jalview.io.DataSourceType;
import jalview.io.FileFormat;
{
for (AlignedCodonFrame alc : alignment.getCodonFrames())
{
- for (SequenceToSequenceMapping ssm : alc.getMappings())
+ for (SequenceMapping ssm : alc.getMappings())
{
if (ssm.getFromSeq().getDatasetSequence() != null)
{
package jalview.datamodel;
import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertSame;
-import jalview.gui.JvOptionPane;
-
-import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
public class MappingTypeTest
{
- @BeforeClass(alwaysRun = true)
- public void setUpJvOptionPane()
- {
- JvOptionPane.setInteractiveMode(false);
- JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
- }
-
- @Test(groups = "Functional")
- public void testGetInverse()
- {
- assertSame(MappingType.PeptideToNucleotide,
- MappingType.NucleotideToPeptide.getInverse());
- assertSame(MappingType.NucleotideToPeptide,
- MappingType.PeptideToNucleotide.getInverse());
- assertSame(MappingType.NucleotideToNucleotide,
- MappingType.NucleotideToNucleotide.getInverse());
- assertSame(MappingType.PeptideToPeptide,
- MappingType.PeptideToPeptide.getInverse());
- }
-
@Test(groups = "Functional")
public void testGetFromRatio()
{
- assertEquals(1, MappingType.NucleotideToNucleotide.getFromRatio());
- assertEquals(1, MappingType.PeptideToNucleotide.getFromRatio());
- assertEquals(1, MappingType.PeptideToPeptide.getFromRatio());
- assertEquals(3, MappingType.NucleotideToPeptide.getFromRatio());
+ /*
+ * nucleotide-nucleotide
+ */
+ assertEquals(1, MappingType.GenomeToCdna.getFromRatio());
+ assertEquals(1, MappingType.CdnaToGenome.getFromRatio());
+ assertEquals(1, MappingType.GenomeToCds.getFromRatio());
+ assertEquals(1, MappingType.CdsToGenome.getFromRatio());
+ assertEquals(1, MappingType.CdnaToCds.getFromRatio());
+ assertEquals(1, MappingType.CdsToCdna.getFromRatio());
+
+ /*
+ * nucleotide-peptide
+ */
+ assertEquals(3, MappingType.GenomeToPeptide.getFromRatio());
+ assertEquals(1, MappingType.PeptideToGenome.getFromRatio());
+ assertEquals(3, MappingType.CdnaToPeptide.getFromRatio());
+ assertEquals(1, MappingType.PeptideToCdna.getFromRatio());
+ assertEquals(3, MappingType.CdsToPeptide.getFromRatio());
+ assertEquals(1, MappingType.PeptideToCds.getFromRatio());
}
@Test(groups = "Functional")
public void testGetToRatio()
{
- assertEquals(1, MappingType.NucleotideToNucleotide.getToRatio());
- assertEquals(3, MappingType.PeptideToNucleotide.getToRatio());
- assertEquals(1, MappingType.PeptideToPeptide.getToRatio());
- assertEquals(1, MappingType.NucleotideToPeptide.getToRatio());
+ /*
+ * nucleotide-nucleotide
+ */
+ assertEquals(1, MappingType.GenomeToCdna.getToRatio());
+ assertEquals(1, MappingType.CdnaToGenome.getToRatio());
+ assertEquals(1, MappingType.GenomeToCds.getToRatio());
+ assertEquals(1, MappingType.CdsToGenome.getToRatio());
+ assertEquals(1, MappingType.CdnaToCds.getToRatio());
+ assertEquals(1, MappingType.CdsToCdna.getToRatio());
+
+ /*
+ * nucleotide-peptide
+ */
+ assertEquals(1, MappingType.GenomeToPeptide.getToRatio());
+ assertEquals(3, MappingType.PeptideToGenome.getToRatio());
+ assertEquals(1, MappingType.CdnaToPeptide.getToRatio());
+ assertEquals(3, MappingType.PeptideToCdna.getToRatio());
+ assertEquals(1, MappingType.CdsToPeptide.getToRatio());
+ assertEquals(3, MappingType.PeptideToCds.getToRatio());
}
}
public void testGetMappingType()
{
// protein-to-dna:
- assertSame(MappingType.PeptideToNucleotide,
+ assertSame(MappingType.PeptideToGenome,
ExonerateHelper
.getMappingType("exonerate:protein2genome:local"));
- assertSame(MappingType.PeptideToNucleotide,
+ assertSame(MappingType.PeptideToGenome,
ExonerateHelper.getMappingType("exonerate:protein2dna:local"));
// dna-to-dna:
- assertSame(MappingType.NucleotideToNucleotide,
+ assertSame(MappingType.GenomeToCdna,
ExonerateHelper.getMappingType("coding2coding"));
- assertSame(MappingType.NucleotideToNucleotide,
+ assertSame(MappingType.GenomeToCdna,
ExonerateHelper.getMappingType("coding2genome"));
- assertSame(MappingType.NucleotideToNucleotide,
+ assertSame(MappingType.GenomeToCdna,
ExonerateHelper.getMappingType("cdna2genome"));
- assertSame(MappingType.NucleotideToNucleotide,
+ assertSame(MappingType.GenomeToCdna,
ExonerateHelper.getMappingType("genome2genome"));
assertNull(ExonerateHelper.getMappingType("affine:local"));
}