X Tutup
Skip to content

Commit 763f7ec

Browse files
authored
Merge pull request #749 from josemduarte/removeV4deprecations
Removed v4 deprecations
2 parents 111782c + 5975b17 commit 763f7ec

File tree

35 files changed

+46
-1956
lines changed

35 files changed

+46
-1956
lines changed

biojava-alignment/src/main/java/org/biojava/nbio/alignment/io/StockholmStructure.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,6 @@ public StockholmConsensusAnnotation getConsAnnotation() {
107107
return consAnnotation;
108108
}
109109

110-
/**
111-
* Actually this function should be called appendToSequence
112-
*
113-
* @param seqName
114-
* @param seqText
115-
* @deprecated Use {@link #appendToSequence(String,String)} instead
116-
*/
117-
@Deprecated
118-
public void addSequence(String seqName, String seqText) {
119-
appendToSequence(seqName, seqText);
120-
}
121-
122110
/**
123111
* @param seqName
124112
* @param seqText

biojava-core/src/main/java/org/biojava/nbio/core/sequence/compound/NucleotideCompound.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,6 @@ public Set<NucleotideCompound> getConstituents() {
104104
return constituents;
105105
}
106106

107-
/**@deprecated replaced with {@link #getConstituents()} due to typographical error */
108-
@Deprecated
109-
public Set<NucleotideCompound> getConsituents() {
110-
return getConstituents();
111-
}
112-
113107
public boolean isAmbiguous() {
114108
return !constituents.isEmpty();
115109
}

biojava-core/src/main/java/org/biojava/nbio/core/sequence/transcription/RNAToAminoAcidTranslator.java

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -67,84 +67,6 @@ public class RNAToAminoAcidTranslator extends
6767
// first residue in the resulting ProteinSequence
6868
private final boolean waitForStartCodon;
6969

70-
/**
71-
* @deprecated Retained for backwards compatability, setting
72-
* {@link #stopAtStopCodons} to <code>false</code>
73-
*/
74-
@Deprecated
75-
public RNAToAminoAcidTranslator(
76-
SequenceCreatorInterface<AminoAcidCompound> creator,
77-
CompoundSet<NucleotideCompound> nucleotides,
78-
CompoundSet<Codon> codons,
79-
CompoundSet<AminoAcidCompound> aminoAcids, Table table,
80-
boolean trimStops, boolean initMetOnly, boolean translateNCodons) {
81-
82-
super(creator, nucleotides, aminoAcids);
83-
this.trimStops = trimStops;
84-
this.initMetOnly = initMetOnly;
85-
this.translateNCodons = translateNCodons;
86-
87-
quickLookup = new HashMap<Table.CaseInsensitiveTriplet, Codon>(codons
88-
.getAllCompounds().size());
89-
aminoAcidToCodon = new HashMap<AminoAcidCompound, List<Codon>>();
90-
91-
List<Codon> codonList = table.getCodons(nucleotides, aminoAcids);
92-
for (Codon codon : codonList) {
93-
quickLookup.put(codon.getTriplet(), codon);
94-
codonArray[codon.getTriplet().intValue()] = codon;
95-
96-
List<Codon> codonL = aminoAcidToCodon.get(codon.getAminoAcid());
97-
if (codonL == null) {
98-
codonL = new ArrayList<Codon>();
99-
aminoAcidToCodon.put(codon.getAminoAcid(), codonL);
100-
}
101-
codonL.add(codon);
102-
103-
}
104-
unknownAminoAcidCompound = aminoAcids.getCompoundForString("X");
105-
methionineAminoAcidCompound = aminoAcids.getCompoundForString("M");
106-
// Set to false for backwards compatability
107-
stopAtStopCodons = false;
108-
waitForStartCodon = false;
109-
}
110-
111-
@Deprecated
112-
public RNAToAminoAcidTranslator(
113-
SequenceCreatorInterface<AminoAcidCompound> creator,
114-
CompoundSet<NucleotideCompound> nucleotides,
115-
CompoundSet<Codon> codons,
116-
CompoundSet<AminoAcidCompound> aminoAcids, Table table,
117-
boolean trimStops, boolean initMetOnly, boolean translateNCodons,
118-
boolean stopAtStopCodons) {
119-
120-
super(creator, nucleotides, aminoAcids);
121-
this.trimStops = trimStops;
122-
this.initMetOnly = initMetOnly;
123-
this.translateNCodons = translateNCodons;
124-
125-
quickLookup = new HashMap<Table.CaseInsensitiveTriplet, Codon>(codons
126-
.getAllCompounds().size());
127-
aminoAcidToCodon = new HashMap<AminoAcidCompound, List<Codon>>();
128-
129-
List<Codon> codonList = table.getCodons(nucleotides, aminoAcids);
130-
for (Codon codon : codonList) {
131-
quickLookup.put(codon.getTriplet(), codon);
132-
codonArray[codon.getTriplet().intValue()] = codon;
133-
134-
List<Codon> codonL = aminoAcidToCodon.get(codon.getAminoAcid());
135-
if (codonL == null) {
136-
codonL = new ArrayList<Codon>();
137-
aminoAcidToCodon.put(codon.getAminoAcid(), codonL);
138-
}
139-
codonL.add(codon);
140-
141-
}
142-
unknownAminoAcidCompound = aminoAcids.getCompoundForString("X");
143-
methionineAminoAcidCompound = aminoAcids.getCompoundForString("M");
144-
this.stopAtStopCodons = stopAtStopCodons;
145-
// Set for backwards compatibility
146-
waitForStartCodon = false;
147-
}
14870

14971
public RNAToAminoAcidTranslator(
15072
SequenceCreatorInterface<AminoAcidCompound> creator,

biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/gff/Feature.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -313,28 +313,6 @@ public String toString() {
313313
return s;
314314
}
315315

316-
/**
317-
* @deprecated
318-
*/
319-
@Deprecated
320-
public static void main(String[] args)
321-
throws Exception {
322-
//Feature f= new Feature();
323-
//intentionally perverse
324-
//f.group= "gene_id transcript; transcript \"gene_id fantom2\"; ";
325-
// f.addAttribute( "author", "julian" );
326-
// f.addAttribute( "curator", "nick" );
327-
// f.addAttribute( "author", "hanno" );
328-
//Log.log( f.group );
329-
//f.addAttribute( "perverse", "foo;goo" );
330-
//assert f.getAttribute( "perverse").equals( "foo;goo" );
331-
// assert f.getAttribute( "gene_id" ).equals( "transcript" );
332-
// assert f.getAttribute( "author" ).equals( "julian hanno" );
333-
// assert f.getAttribute( "curator" ).equals( "nick" );
334-
// assert f.getAttribute( "transcript").equals( "gene_id fantom2" );
335-
//Log.log( "passed test." );
336-
}
337-
338316
@Override
339317
public HashMap<String, String> getAttributes() {
340318

biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/gff/FeatureList.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -497,16 +497,6 @@ public FeatureList sortByStart() {
497497
return new FeatureList(Arrays.asList(array));
498498
}
499499

500-
/**
501-
* @deprecated
502-
*
503-
*/
504-
// FIXME features may have a null location() !!
505-
@Deprecated
506-
static public void main(String[] args) {
507-
}
508-
509-
510500
/**
511501
* Add a list of attributes that will be used as indexes for queries
512502
* @param indexes the List containing the attribute_id

biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/gff/Location.java

Lines changed: 1 addition & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
*/
2121
package org.biojava.nbio.genome.parsers.gff;
2222

23-
import org.biojava.nbio.genome.App;
24-
import org.slf4j.Logger;
25-
import org.slf4j.LoggerFactory;
26-
2723

2824
/**
2925
* A location on a sequence.
@@ -72,16 +68,10 @@
7268
*/
7369
public class Location implements Iterable<Location>
7470
{
75-
private static final Logger logger = LoggerFactory.getLogger(App.class);
76-
71+
7772
private int mStart;
7873
private int mEnd;
7974

80-
// /**
81-
// */
82-
// private Location()
83-
// {
84-
// }
8575

8676
/**
8777
* Construct new location from coordinates.
@@ -895,108 +885,4 @@ private boolean isHealthy()
895885
return ( mStart <= mEnd ) && (( mStart <= 0 && mEnd <= 0 ) || (mStart >= 0 && mEnd >= 0));
896886
}
897887

898-
//shorthand for testing
899-
static private Location L( int s, int e )
900-
{
901-
return new Location( s, e );
902-
}
903-
904-
@SuppressWarnings("unused")
905-
static private Location R( int s, int e )
906-
{
907-
return new Location( -e, -s );
908-
}
909-
910-
911-
/**
912-
* @deprecated
913-
*/
914-
@Deprecated
915-
@SuppressWarnings("unused")
916-
public static void main(String[] args )
917-
throws Exception
918-
{
919-
Location p3_7= new Location( 3, 7 );
920-
Location p16_19= new Location( 16, 19 );
921-
Location p15_19= new Location( 15, 19 );
922-
Location p15_16= new Location( 15, 16 );
923-
Location p10_17= new Location( 10, 17 );
924-
Location p10_12= new Location( 10, 12 );
925-
Location p14_17= new Location( 14, 17 );
926-
Location p14_14= new Location( 14, 14 );
927-
928-
Location r13_17= new Location( 13, 17 );
929-
Location r21_25= new Location( 21, 25 );
930-
931-
Location r4_7= new Location( 4, 7 );
932-
Location r2_5= new Location( 2, 5 );
933-
Location r0_3= new Location( 0, 3 );
934-
Location r5_8= new Location( 5, 8 );
935-
936-
//distance
937-
assert L(14,14).distance( L(3,7) ) == 7;
938-
assert L(3,7).distance( L(14,14) ) == 7;
939-
assert L(1,4).distance( L(7, 10) ) == 3;
940-
941-
//union
942-
assert p10_12.union( p14_17 ).equals( p10_17 );
943-
assert p14_17.union( p10_12 ).equals( p10_17 );
944-
assert p15_19.union( p15_16).equals( p15_19 );
945-
946-
//intersection
947-
assert r13_17.union( r21_25 ).intersection( r21_25 ).equals( new Location( 21, 25 ));
948-
949-
950-
//isBefore
951-
assert r2_5.isBefore( r5_8 );
952-
assert !r2_5.isBefore( r4_7 );
953-
954-
//isAfter
955-
assert r5_8.isAfter( r2_5 );
956-
assert !r5_8.isAfter( r4_7 );
957-
958-
//contains
959-
assert p15_19.contains( p16_19 );
960-
961-
//overlaps
962-
assert r2_5.overlaps( r4_7 );
963-
assert r2_5.overlaps( r0_3 );
964-
assert !r5_8.overlaps( r2_5 );
965-
assert !r2_5.overlaps( r5_8 );
966-
967-
968-
//prefix
969-
assert L(2,20).prefix(1).equals( L(2,3));
970-
assert L(2,20).prefix(-1).equals( L(2,19));
971-
assert L(2,20).prefix( L(10,12)).equals( L(2,10));
972-
973-
//suffix
974-
assert L(2,20).suffix(1).equals( L(3,20));
975-
assert L(2,20).suffix(-1).equals( L(19,20));
976-
assert L(2,20).suffix( L(10,12)).equals( L(12,20));
977-
978-
979-
//upstream
980-
//downstream
981-
982-
//startsBefore
983-
//startsAfter
984-
//endsBefore
985-
//endsAfter
986-
987-
//equals
988-
989-
//percentoverlap
990-
991-
992-
//plus
993-
//minus
994-
//isNegative
995-
//oppposite
996-
997-
//fromBio, etc.
998-
999-
logger.info("JavaGene.Location Passed.");
1000-
}
1001-
1002888
}

0 commit comments

Comments
 (0)
X Tutup