X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,6 @@ public StockholmConsensusAnnotation getConsAnnotation() {
return consAnnotation;
}

/**
* Actually this function should be called appendToSequence
*
* @param seqName
* @param seqText
* @deprecated Use {@link #appendToSequence(String,String)} instead
*/
@Deprecated
public void addSequence(String seqName, String seqText) {
appendToSequence(seqName, seqText);
}

/**
* @param seqName
* @param seqText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@ public Set<NucleotideCompound> getConstituents() {
return constituents;
}

/**@deprecated replaced with {@link #getConstituents()} due to typographical error */
@Deprecated
public Set<NucleotideCompound> getConsituents() {
return getConstituents();
}

public boolean isAmbiguous() {
return !constituents.isEmpty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,84 +67,6 @@ public class RNAToAminoAcidTranslator extends
// first residue in the resulting ProteinSequence
private final boolean waitForStartCodon;

/**
* @deprecated Retained for backwards compatability, setting
* {@link #stopAtStopCodons} to <code>false</code>
*/
@Deprecated
public RNAToAminoAcidTranslator(
SequenceCreatorInterface<AminoAcidCompound> creator,
CompoundSet<NucleotideCompound> nucleotides,
CompoundSet<Codon> codons,
CompoundSet<AminoAcidCompound> aminoAcids, Table table,
boolean trimStops, boolean initMetOnly, boolean translateNCodons) {

super(creator, nucleotides, aminoAcids);
this.trimStops = trimStops;
this.initMetOnly = initMetOnly;
this.translateNCodons = translateNCodons;

quickLookup = new HashMap<Table.CaseInsensitiveTriplet, Codon>(codons
.getAllCompounds().size());
aminoAcidToCodon = new HashMap<AminoAcidCompound, List<Codon>>();

List<Codon> codonList = table.getCodons(nucleotides, aminoAcids);
for (Codon codon : codonList) {
quickLookup.put(codon.getTriplet(), codon);
codonArray[codon.getTriplet().intValue()] = codon;

List<Codon> codonL = aminoAcidToCodon.get(codon.getAminoAcid());
if (codonL == null) {
codonL = new ArrayList<Codon>();
aminoAcidToCodon.put(codon.getAminoAcid(), codonL);
}
codonL.add(codon);

}
unknownAminoAcidCompound = aminoAcids.getCompoundForString("X");
methionineAminoAcidCompound = aminoAcids.getCompoundForString("M");
// Set to false for backwards compatability
stopAtStopCodons = false;
waitForStartCodon = false;
}

@Deprecated
public RNAToAminoAcidTranslator(
SequenceCreatorInterface<AminoAcidCompound> creator,
CompoundSet<NucleotideCompound> nucleotides,
CompoundSet<Codon> codons,
CompoundSet<AminoAcidCompound> aminoAcids, Table table,
boolean trimStops, boolean initMetOnly, boolean translateNCodons,
boolean stopAtStopCodons) {

super(creator, nucleotides, aminoAcids);
this.trimStops = trimStops;
this.initMetOnly = initMetOnly;
this.translateNCodons = translateNCodons;

quickLookup = new HashMap<Table.CaseInsensitiveTriplet, Codon>(codons
.getAllCompounds().size());
aminoAcidToCodon = new HashMap<AminoAcidCompound, List<Codon>>();

List<Codon> codonList = table.getCodons(nucleotides, aminoAcids);
for (Codon codon : codonList) {
quickLookup.put(codon.getTriplet(), codon);
codonArray[codon.getTriplet().intValue()] = codon;

List<Codon> codonL = aminoAcidToCodon.get(codon.getAminoAcid());
if (codonL == null) {
codonL = new ArrayList<Codon>();
aminoAcidToCodon.put(codon.getAminoAcid(), codonL);
}
codonL.add(codon);

}
unknownAminoAcidCompound = aminoAcids.getCompoundForString("X");
methionineAminoAcidCompound = aminoAcids.getCompoundForString("M");
this.stopAtStopCodons = stopAtStopCodons;
// Set for backwards compatibility
waitForStartCodon = false;
}

public RNAToAminoAcidTranslator(
SequenceCreatorInterface<AminoAcidCompound> creator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,28 +313,6 @@ public String toString() {
return s;
}

/**
* @deprecated
*/
@Deprecated
public static void main(String[] args)
throws Exception {
//Feature f= new Feature();
//intentionally perverse
//f.group= "gene_id transcript; transcript \"gene_id fantom2\"; ";
// f.addAttribute( "author", "julian" );
// f.addAttribute( "curator", "nick" );
// f.addAttribute( "author", "hanno" );
//Log.log( f.group );
//f.addAttribute( "perverse", "foo;goo" );
//assert f.getAttribute( "perverse").equals( "foo;goo" );
// assert f.getAttribute( "gene_id" ).equals( "transcript" );
// assert f.getAttribute( "author" ).equals( "julian hanno" );
// assert f.getAttribute( "curator" ).equals( "nick" );
// assert f.getAttribute( "transcript").equals( "gene_id fantom2" );
//Log.log( "passed test." );
}

@Override
public HashMap<String, String> getAttributes() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,16 +497,6 @@ public FeatureList sortByStart() {
return new FeatureList(Arrays.asList(array));
}

/**
* @deprecated
*
*/
// FIXME features may have a null location() !!
@Deprecated
static public void main(String[] args) {
}


/**
* Add a list of attributes that will be used as indexes for queries
* @param indexes the List containing the attribute_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
*/
package org.biojava.nbio.genome.parsers.gff;

import org.biojava.nbio.genome.App;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
* A location on a sequence.
Expand Down Expand Up @@ -72,16 +68,10 @@
*/
public class Location implements Iterable<Location>
{
private static final Logger logger = LoggerFactory.getLogger(App.class);


private int mStart;
private int mEnd;

// /**
// */
// private Location()
// {
// }

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

//shorthand for testing
static private Location L( int s, int e )
{
return new Location( s, e );
}

@SuppressWarnings("unused")
static private Location R( int s, int e )
{
return new Location( -e, -s );
}


/**
* @deprecated
*/
@Deprecated
@SuppressWarnings("unused")
public static void main(String[] args )
throws Exception
{
Location p3_7= new Location( 3, 7 );
Location p16_19= new Location( 16, 19 );
Location p15_19= new Location( 15, 19 );
Location p15_16= new Location( 15, 16 );
Location p10_17= new Location( 10, 17 );
Location p10_12= new Location( 10, 12 );
Location p14_17= new Location( 14, 17 );
Location p14_14= new Location( 14, 14 );

Location r13_17= new Location( 13, 17 );
Location r21_25= new Location( 21, 25 );

Location r4_7= new Location( 4, 7 );
Location r2_5= new Location( 2, 5 );
Location r0_3= new Location( 0, 3 );
Location r5_8= new Location( 5, 8 );

//distance
assert L(14,14).distance( L(3,7) ) == 7;
assert L(3,7).distance( L(14,14) ) == 7;
assert L(1,4).distance( L(7, 10) ) == 3;

//union
assert p10_12.union( p14_17 ).equals( p10_17 );
assert p14_17.union( p10_12 ).equals( p10_17 );
assert p15_19.union( p15_16).equals( p15_19 );

//intersection
assert r13_17.union( r21_25 ).intersection( r21_25 ).equals( new Location( 21, 25 ));


//isBefore
assert r2_5.isBefore( r5_8 );
assert !r2_5.isBefore( r4_7 );

//isAfter
assert r5_8.isAfter( r2_5 );
assert !r5_8.isAfter( r4_7 );

//contains
assert p15_19.contains( p16_19 );

//overlaps
assert r2_5.overlaps( r4_7 );
assert r2_5.overlaps( r0_3 );
assert !r5_8.overlaps( r2_5 );
assert !r2_5.overlaps( r5_8 );


//prefix
assert L(2,20).prefix(1).equals( L(2,3));
assert L(2,20).prefix(-1).equals( L(2,19));
assert L(2,20).prefix( L(10,12)).equals( L(2,10));

//suffix
assert L(2,20).suffix(1).equals( L(3,20));
assert L(2,20).suffix(-1).equals( L(19,20));
assert L(2,20).suffix( L(10,12)).equals( L(12,20));


//upstream
//downstream

//startsBefore
//startsAfter
//endsBefore
//endsAfter

//equals

//percentoverlap


//plus
//minus
//isNegative
//oppposite

//fromBio, etc.

logger.info("JavaGene.Location Passed.");
}

}
Loading
X Tutup