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 @@ -24,6 +24,7 @@

import org.biojava3.core.sequence.compound.AminoAcidCompound;
import org.biojava3.core.sequence.compound.AminoAcidCompoundSet;
import org.biojava3.core.sequence.compound.NucleotideCompound;
import org.biojava3.core.sequence.loader.StringProxySequenceReader;
import org.biojava3.core.sequence.template.AbstractSequence;
import org.biojava3.core.sequence.template.CompoundSet;
Expand Down Expand Up @@ -83,7 +84,9 @@ public ProteinSequence(ProxySequenceReader<AminoAcidCompound> proxyLoader, Compo
* @param begin
* @param end
*/
public void setParentDNASequence(AbstractSequence parentDNASequence, Integer begin, Integer end) {
//TODO - Someone needs to check if this is a bug. Shouldn't a parentDNASequence be something other then AminoAcid?
//However, due to the derivation of this class, this is the only possible type argument for this parameter...
public void setParentDNASequence(AbstractSequence<NucleotideCompound> parentDNASequence, Integer begin, Integer end) {
this.setParentSequence(parentDNASequence);
setBioBegin(begin);
setBioEnd(end);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public abstract class AbstractSequence<C extends Compound> implements Sequence<C
private Collection<Object> userCollection;
private Integer bioBegin = null;
private Integer bioEnd = null;
private AbstractSequence<C> parentSequence = null;
private AbstractSequence<?> parentSequence = null;
private String source = null;
private ArrayList<String> notesList = new ArrayList<String>();
private Double sequenceScore = null;
Expand Down Expand Up @@ -226,14 +226,14 @@ public void setOriginalHeader(String originalHeader) {
/**
* @return the parentSequence
*/
public AbstractSequence<C> getParentSequence() {
public AbstractSequence<?> getParentSequence() {
return parentSequence;
}

/**
* @param parentSequence the parentSequence to set
*/
public void setParentSequence(AbstractSequence<C> parentSequence) {
public void setParentSequence(AbstractSequence<?> parentSequence) {
this.parentSequence = parentSequence;
}

Expand Down Expand Up @@ -474,9 +474,13 @@ public CompoundSet<C> getCompoundSet() {
if (compoundSet != null) {
return compoundSet;
}
// This is invalid since the parentSequence isn't guaranteed to have the same compound set as this sequence,
// e.g., the case where the parent sequence for a protein is a CDS.
/*
if (parentSequence != null) {
return parentSequence.getCompoundSet();
}
*/
return null;


Expand All @@ -495,9 +499,11 @@ private SequenceReader<C> getSequenceStorage() {
if (sequenceStorage != null) {
return sequenceStorage;
}
/*
if (parentSequence != null) {
return parentSequence.getSequenceStorage();
}
*/
return null;
}

Expand Down