- Set<SequenceI> mappedDna = new HashSet<SequenceI>();
- Set<SequenceI> mappedProtein = new HashSet<SequenceI>();
+ Set<SequenceI> mappedDna = new HashSet<>();
+ Set<SequenceI> mappedProtein = new HashSet<>();
Map<AlignedCodon, Map<SequenceI, AlignedCodon>> alignedCodons = buildCodonColumnsMap(
protein, dna, unmappedProtein);
return alignProteinAs(protein, alignedCodons, unmappedProtein);
Map<AlignedCodon, Map<SequenceI, AlignedCodon>> alignedCodons = buildCodonColumnsMap(
protein, dna, unmappedProtein);
return alignProteinAs(protein, alignedCodons, unmappedProtein);
* {dnaSequence, {proteinSequence, codonProduct}} at that position. The
* comparator keeps the codon positions ordered.
*/
* {dnaSequence, {proteinSequence, codonProduct}} at that position. The
* comparator keeps the codon positions ordered.
*/
- Map<AlignedCodon, Map<SequenceI, AlignedCodon>> alignedCodons = new TreeMap<AlignedCodon, Map<SequenceI, AlignedCodon>>(
+ Map<AlignedCodon, Map<SequenceI, AlignedCodon>> alignedCodons = new TreeMap<>(
// TODO delete this ugly hack once JAL-2022 is resolved
// i.e. we can model startPhase > 0 (incomplete start codon)
// TODO delete this ugly hack once JAL-2022 is resolved
// i.e. we can model startPhase > 0 (incomplete start codon)
alignedCodons.put(codon, seqProduct);
}
seqProduct.put(protein, codon);
alignedCodons.put(codon, seqProduct);
}
seqProduct.put(protein, codon);
- List<SequenceI> foundSeqs = new ArrayList<SequenceI>();
- List<SequenceI> cdsSeqs = new ArrayList<SequenceI>();
+ List<SequenceI> foundSeqs = new ArrayList<>();
+ List<SequenceI> cdsSeqs = new ArrayList<>();
SequenceI contig, SequenceI proteinProduct, Mapping mapping)
{
// gather direct refs from contig congruent with mapping
SequenceI contig, SequenceI proteinProduct, Mapping mapping)
{
// gather direct refs from contig congruent with mapping
- List<DBRefEntry> direct = new ArrayList<DBRefEntry>();
- HashSet<String> directSources = new HashSet<String>();
+ List<DBRefEntry> direct = new ArrayList<>();
+ HashSet<String> directSources = new HashSet<>();
DBRefEntry[] onSource = DBRefUtils.selectRefs(
proteinProduct.getDBRefs(),
directSources.toArray(new String[0]));
DBRefEntry[] onSource = DBRefUtils.selectRefs(
proteinProduct.getDBRefs(),
directSources.toArray(new String[0]));
* map from peptide position to all variants of the codon which codes for it
* LinkedHashMap ensures we keep the peptide features in sequence order
*/
* map from peptide position to all variants of the codon which codes for it
* LinkedHashMap ensures we keep the peptide features in sequence order
*/
List<SequenceFeature> dnaFeatures = dnaSeq.getFeatures()
.getFeaturesByOntology(SequenceOntologyI.SEQUENCE_VARIANT);
List<SequenceFeature> dnaFeatures = dnaSeq.getFeatures()
.getFeaturesByOntology(SequenceOntologyI.SEQUENCE_VARIANT);
- codonVariants[0] = new ArrayList<DnaVariant>();
- codonVariants[1] = new ArrayList<DnaVariant>();
- codonVariants[2] = new ArrayList<DnaVariant>();
+ codonVariants[0] = new ArrayList<>();
+ codonVariants[1] = new ArrayList<>();
+ codonVariants[2] = new ArrayList<>();
Map<Integer, Map<SequenceI, Character>> columnMap = buildMappedColumnsMap(
unaligned, aligned, unmapped);
int width = columnMap.size();
Map<Integer, Map<SequenceI, Character>> columnMap = buildMappedColumnsMap(
unaligned, aligned, unmapped);
int width = columnMap.size();
* {unalignedSequence, characterPerSequence} at that position.
* TreeMap keeps the entries in ascending column order.
*/
* {unalignedSequence, characterPerSequence} at that position.
* TreeMap keeps the entries in ascending column order.
*/
- SortedMap<Integer, Map<SequenceI, Character>> map = new TreeMap<Integer, Map<SequenceI, Character>>();
+ SortedMap<Integer, Map<SequenceI, Character>> map = new TreeMap<>();
map.put(fromCol, seqsMap);
}
seqsMap.put(seq, seq.getCharAt(mappedCharPos - toStart));
map.put(fromCol, seqsMap);
}
seqsMap.put(seq, seq.getCharAt(mappedCharPos - toStart));