public class NucleotidSequences
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
NucleotidSequences(java.lang.String hybridizationType,
NucleotidSequences sequences)
Creates a new NucleotidSequences object from a reference nucleotiDSequences object.
|
|
NucleotidSequences(java.lang.String sequence,
java.lang.String complementary)
Creates a NucleotidSequences object from two String.
|
Modifier and Type | Method and Description |
---|---|
static NucleotidSequences |
buildSymetricSequences(java.lang.String seq1,
java.lang.String seq2)
creates a NucleotidSequences with two symmetric sequences String created from the
seq1 String an seq2 String.
|
double |
calculateNumberOfTerminal(java.lang.String base1,
java.lang.String base2,
int pos1,
int pos2)
calculates the number of base pairs (base1, base2) at the postions pos1 and pos2 in the duplex of NucleotidSequences.
|
static boolean |
checkSequence(java.lang.String sequence)
Checks if the String sequence is composed of nucleic acids known by MELTING.
|
int |
computesInternalLoopLength(int pos1,
int pos2)
computes the number of nucleic acids in the internal loop between the positions pos1 + 1 and
pos2 - 1 in the duplex ArrayList of the NucleotidSequences object.
|
double |
computesPercentGC()
computes the percentage of GC base pairs in the duplex of NucleotidSequences.
|
double |
computesPercentMismatching()
Computes the percentage of mismatching base pairs in the duplex of NucleotidSequences.
|
static java.lang.String |
convertToPyr_Pur(java.lang.String sequence)
converts a sequence into a String composed of purine and pyrimidine.
|
java.lang.String[] |
correctSequences(java.lang.String sequence,
java.lang.String complementary)
removes the unnecessary "-" in the String sequence and complementary of NucleotidSequences.
|
static java.lang.String[] |
decodeSequences(java.lang.String sequence,
java.lang.String complementary)
decodes the String sequence and complementary of NucleotidSequences.
|
java.lang.String[] |
encodeSequences(java.lang.String sequence,
java.lang.String complementary)
encodes the String sequence and complementary of the NucleotidSequences object.
|
java.lang.String |
getComplementary()
This method is called to get the encoded complementary String of NucleotidSequences.
|
java.lang.String |
getComplementary(int pos1,
int pos2)
This method is called to get a substring between two positions of the complementary String.
|
java.lang.String |
getComplementary(int pos1,
int pos2,
java.lang.String hybridizationType)
This method is called to get a substring of the complementary String between the positions pos1 and pos2 in the duplex.
|
java.lang.String |
getComplementaryNNPair(int pos)
to get the two nucleic acids which are from the complementary sequence (3'5') in the Crick's pair at the position "pos" in the duplex.
|
java.lang.String |
getComplementaryNNPairUnlocked(int pos)
to get the two unlocked nucleic acids which are from the complementary sequence (3'5') in the Crick's pair at the position "pos" in the duplex.
|
static java.lang.String |
getComplementarySequence(java.lang.String sequence,
java.lang.String hybridization)
This method is called when we want to get the complementary of NucleotidSequences with the
type of hybridization "hybridization".
|
java.lang.String |
getComplementaryTo(java.lang.String sequence,
int pos1,
int pos2)
This method is called to get the complementary sequence to the sequence String between the positions pos1 and pos2.
|
static java.lang.String |
getDanglingSens(java.lang.String seq1,
java.lang.String seq2)
this method is called to get the sens of the dangling end for the sequences seq1 and seq2
|
java.util.ArrayList<BasePair> |
getDuplex()
This method is called to get the duplex of NucleotidSequences.
|
static java.util.ArrayList<BasePair> |
getDuplexFrom(java.lang.String sequence,
java.lang.String complementary)
This method is called to get the duplex of NucleotidSequences.
|
int |
getDuplexLength()
This method is called to get the length of the ArrayList duplex of NucleotidSequences.
|
NucleotidSequences |
getEquivalentSequences(java.lang.String hybridizationType)
This method is called when the same NucleotidSequences is required but with the sequences converted in the new
hybridization type "hybridizationType"
|
java.lang.String |
getInternalLoopType(int pos1,
int pos2)
gives the type of the internal loop at the positions pos1 + 1 and pos2 - 1 in the duplex ArrayList of the NucleotidSequences object.
|
static java.lang.String |
getInversedSequence(java.lang.String sequence)
creates the inverse String of the sequence
|
java.lang.String[] |
getLoopFistMismatch(int pos1)
This method is called to get the first mismatch of the internal loop at the positions pos1 + 1 and pos2 - 1
in the duplex ArrayList of the NucleotidSequences object.
|
SpecificAcidNames |
getModifiedAcidName(BasePair pair)
This method is called to get the name of a specific nucleic acid in the base pair (BasePair object).
|
static java.util.HashMap<java.lang.String,SpecificAcidNames> |
getModifiedAcidNames()
This method is called to get the modifiedAcidNames of NucleotidSequences.
|
java.lang.String[] |
getNNPairWithoutHydroxyA(int pos)
to get the two nucleic acids from each sequence in the Crick's pair at the position "pos" in the duplex.
|
double |
getNumberTerminal5TA(int pos1,
int pos2)
calculates the number of terminal 5'T3'A in the subduplex between pos1 and pos2
|
java.lang.String |
getSequence()
This method is called to get the encoded sequence String of NucleotidSequences.
|
java.lang.String |
getSequence(int pos1,
int pos2)
This method is called to get a substring between two positions of the sequence String.
|
java.lang.String |
getSequence(int pos1,
int pos2,
java.lang.String hybridizationType)
This method is called to get a substring of the sequence String between the positions pos1 and pos2 in the duplex.
|
java.lang.String |
getSequenceContaining(java.lang.String pattern,
int pos1,
int pos2)
this method is called to get the String sequence or complementary of NucleotidSequences.
|
java.lang.String |
getSequenceNNPair(int pos)
to get the two nucleic acids which are from the sequence (5'3') in the Crick's pair at the position "pos" in the duplex.
|
java.lang.String |
getSequenceNNPairUnlocked(int pos)
to get the two unlocked nucleic acids which are from the sequence (5'3') in the Crick's pair at the position "pos" in the duplex.
|
java.lang.String |
getSequenceSens(java.lang.String sequence,
int pos1,
int pos2)
To get the orientation of the subsequence sequence.
|
java.lang.String[] |
getSingleBulgeNeighbors(int pos1)
This method is called to get the base pairs adjacent to the single bulge loop (unpaired nucleic acid) at the position pos1 in the duplex ArrayList
|
static void |
initialiseModifiedAcidHashmap()
initialises the modifiedAcidNames of NucleotidSequences.
|
boolean |
isAPyrimidineInThePosition(int pos)
to check if there is at least one pyrimidine in the base pair at the position pos of the duplex ArrayList.
|
boolean |
isAsymetricInternalLoop(int pos1,
int pos2)
to check if the internal loop between the positions pos1 + 1 and pos2 - 1 in the duplex ArrayList
is asymetric.
|
boolean |
isBasePair(java.lang.String base1,
java.lang.String base2,
int pos)
To check if the base pair at the position pos in the duplex is (base1, base2) or (base2, base1).
|
boolean |
isBulgeLoop(int pos1,
int pos2)
to check if the pattern between the positions pos1 and pos2 in the duplex is a single or long bulge loop.
|
boolean |
isCNGPattern(int pos1,
int pos2)
to check if the pattern between the positions pos1 and pos2 in the duplex is a CNG repeat pattern.
|
boolean |
isDanglingEnd(int pos1,
int pos2)
to check if there is at least one dangling end between the positions pos1 and pos2 in the duplex.
|
boolean |
isGUSequences(int pos1,
int pos2)
to check if the pattern between the positions pos1 and pos2 in the duplex is only composed of GU base pairs.
|
boolean |
isMismatch(int pos1,
int pos2)
to check if the pattern between the positions pos1 and pos2 in the duplex is a single mismatch, tandem mismatch or internal loop.
|
boolean |
isMismatchPair(int pos)
to check if the base pair at the position pos in the duplex is a mismatch.
|
boolean |
isNoGapInSequence(int pos1,
int pos2)
to chack if there is no gap (an unpaired nucleic acid) in the duplex between theb positions pos1 and pos2
|
boolean |
isOneGCBasePair()
To check if there is at least one GC base pair in the duplex of NucleotidSequences.
|
boolean |
isPerfectMatchSequence(int pos1,
int pos2)
to check to check if the sequences between the positions pos1 and pos2 in the duplex are perfectly
matching sequences.
|
boolean |
isRegisteredNucleicAcid(int pos)
to check if the nucleic acids in the base pair at the position pos in the duplex are existing nucleic acids.
|
static boolean |
isSelfComplementarySequence(java.lang.String sequence)
To check if a sequence is self complementary.
|
boolean |
isSymmetric(int pos1,
int pos2)
To check if the String sequence and String complementary are symmetric between the positions pos1 and pos2
in the duplex ArrayList of the NucleotidSequences object.
|
boolean |
isTandemMismatchDeltaPPenaltyNecessary(int pos)
to check if there is an AG or GA base pair adjacent to an UC or CU base pair or a CC base pair
adjacent to an AA base pair.
|
boolean |
isTandemMismatchGGPenaltyNecessary(int pos)
To check if there is a GG base pair adjacent to a AA base pair or a base pair containing a pyrimidine ("C", "T" or "U").
|
int[] |
removeTerminalUnpairedNucleotides()
find the real starting and ending positions of the duplex.
|
public NucleotidSequences(java.lang.String sequence, java.lang.String complementary)
sequence
- : the sequence (5'3')complementary
- : the complementary sequence (3'5')protected NucleotidSequences(java.lang.String hybridizationType, NucleotidSequences sequences)
hybridizationType
- : hybridization type of the duplex.sequences
- : the reference nucleotidSequences object.public NucleotidSequences getEquivalentSequences(java.lang.String hybridizationType)
hybridizationType
- : the new hybridization type of the sequencespublic java.lang.String[] encodeSequences(java.lang.String sequence, java.lang.String complementary)
sequence
- : the sequence (5'3')complementary
- : the complementary sequence (3'5')public java.lang.String[] correctSequences(java.lang.String sequence, java.lang.String complementary)
sequence
- : the sequence (5'3')complementary
- : the complementary sequence (3'5')public java.lang.String getComplementaryTo(java.lang.String sequence, int pos1, int pos2)
sequence
- : substring of one of the sequences (sequence 5'3' or the complementary 3'5')pos1
- : starting position of the subsequence in the duplexpos2
- : ending position of the subsequence in the duplexpublic java.lang.String getSequenceContaining(java.lang.String pattern, int pos1, int pos2)
pattern
- pos1
- : starting position of the pattern in the duplexpos2
- : ending position of the pattern in the duplexpublic boolean isCNGPattern(int pos1, int pos2)
pos1
- : starting position of the pattern in the duplexpos2
- : ending position of the pattern in the duplexpublic boolean isPerfectMatchSequence(int pos1, int pos2)
pos1
- : starting position of the pattern in the duplexpos2
- : ending position of the pattern in the duplexpublic boolean isDanglingEnd(int pos1, int pos2)
pos1
- : starting position of the pattern in the duplexpos2
- : ending position of the pattern in the duplexpublic boolean isGUSequences(int pos1, int pos2)
pos1
- : starting position of the pattern in the duplexpos2
- : ending position of the pattern in the duplexpublic boolean isMismatchPair(int pos)
pos
- : the position of the base pair to test in the duplex ArrayListpublic boolean isMismatch(int pos1, int pos2)
pos1
- : starting position of the pattern in the duplexpos2
- : ending position of the pattern in the duplexpublic boolean isBulgeLoop(int pos1, int pos2)
pos1
- : starting position of the pattern in the duplexpos2
- : ending position of the pattern in the duplexpublic boolean isRegisteredNucleicAcid(int pos)
pos
- : position of the nucleic acid in the duplexpublic SpecificAcidNames getModifiedAcidName(BasePair pair)
pair
- public boolean isAPyrimidineInThePosition(int pos)
pos
- : position of the base pair in the duplexpublic boolean isTandemMismatchGGPenaltyNecessary(int pos)
pos
- : position of the Crick' pair in the duplexpublic boolean isTandemMismatchDeltaPPenaltyNecessary(int pos)
pos
- : positions of the Crick's pair in the duplexpublic boolean isNoGapInSequence(int pos1, int pos2)
pos1
- : starting position of the subsequence in the duplexpos2
- : ending position of the subsequence in the duplexpublic boolean isSymmetric(int pos1, int pos2)
pos1
- : starting position of the subduplex in the duplex ArrayList of NucleotidSequences object.pos2
- : ending position of the subduplex in the duplex ArrayList of NucleotidSequences object.public java.lang.String getInternalLoopType(int pos1, int pos2)
pos1
- : position preceding the starting position of the internal looppos2
- : position following the ending position of the internal looppublic java.lang.String[] getLoopFistMismatch(int pos1)
pos1
- : the position preceding the internal loop.public java.lang.String[] getSingleBulgeNeighbors(int pos1)
pos1
- : position preceding the unpaired nucleic acid in the single bulge loop.public boolean isAsymetricInternalLoop(int pos1, int pos2)
pos1
- : position preceding the starting position of the internal looppos2
- : position following the ending position of the internal looppublic java.lang.String getSequence(int pos1, int pos2, java.lang.String hybridizationType)
pos1
- : starting position of the subsequencepos2
- : ending position of the subsequencehybridizationType
- : type of sequence ("dna" or "rna")public java.lang.String getComplementary(int pos1, int pos2, java.lang.String hybridizationType)
pos1
- : starting position of the subsequencepos2
- : ending position of the subsequencehybridizationType
- : type of sequence ("dna" or "rna")public int computesInternalLoopLength(int pos1, int pos2)
pos1
- : position preceding the starting position of the internal looppos2
- : position following the ending position of the internal looppublic java.util.ArrayList<BasePair> getDuplex()
public java.lang.String getSequenceSens(java.lang.String sequence, int pos1, int pos2)
sequence
- : a substring of sequence String or complementary String.pos1
- : the starting position of the substring in the sequence String or complementary Stringpos2
- : the ending position of the substring in the sequence String or complementary Stringpublic double computesPercentGC()
public double computesPercentMismatching()
public boolean isOneGCBasePair()
public int getDuplexLength()
public java.lang.String getSequence()
public java.lang.String getComplementary()
public java.lang.String getSequence(int pos1, int pos2)
pos1
- : starting position of the subsequencepos2
- : ending position of the subsequencepublic java.lang.String getComplementary(int pos1, int pos2)
pos1
- : starting position of the subsequencepos2
- : ending position of the subsequencepublic java.lang.String getSequenceNNPair(int pos)
pos
- : position of the crick's pair in the duplex.public java.lang.String getComplementaryNNPair(int pos)
pos
- : position of the crick's pair in the duplex.public java.lang.String getSequenceNNPairUnlocked(int pos)
pos
- : position of the crick's pair in the duplex.public java.lang.String getComplementaryNNPairUnlocked(int pos)
pos
- : position of the crick's pair in the duplex.public java.lang.String[] getNNPairWithoutHydroxyA(int pos)
pos
- : position of the crick's pair in the duplex.public double calculateNumberOfTerminal(java.lang.String base1, java.lang.String base2, int pos1, int pos2)
base1
- base2
- pos1
- : starting position of the subsequence in the duplex of NucleotidSequences.pos2
- : ending position of the subsequence in the duplex of NucleotidSequences.public double getNumberTerminal5TA(int pos1, int pos2)
pos1
- : starting position of the subsequence in the duplex of NucleotidSequences.pos2
- : ending position of the subsequence in the duplex of NucleotidSequences.public int[] removeTerminalUnpairedNucleotides()
public boolean isBasePair(java.lang.String base1, java.lang.String base2, int pos)
base1
- base2
- pos
- : position of the base pair in the duplexpublic static java.util.ArrayList<BasePair> getDuplexFrom(java.lang.String sequence, java.lang.String complementary)
sequence
- : sequence (5'3')complementary
- : complementary sequence (3'5')public static java.lang.String[] decodeSequences(java.lang.String sequence, java.lang.String complementary)
sequence
- : sequence (5'3')complementary
- : complementary sequence (3'5')public static NucleotidSequences buildSymetricSequences(java.lang.String seq1, java.lang.String seq2)
seq1
- : sequence (5'3')seq2
- : complementary sequence (3'5')public static java.lang.String getInversedSequence(java.lang.String sequence)
sequence
- to inversepublic static boolean isSelfComplementarySequence(java.lang.String sequence)
sequence
- public static java.lang.String convertToPyr_Pur(java.lang.String sequence)
sequence
- to convert in purine-pyrimidine sequence.public static java.util.HashMap<java.lang.String,SpecificAcidNames> getModifiedAcidNames()
public static void initialiseModifiedAcidHashmap()
public static java.lang.String getComplementarySequence(java.lang.String sequence, java.lang.String hybridization)
sequence
- hybridization
- : type of hybridizationpublic static boolean checkSequence(java.lang.String sequence)
sequence
- public static java.lang.String getDanglingSens(java.lang.String seq1, java.lang.String seq2)
seq1
- : String terminal pattern of the sequence (5'3')seq2
- : String terminal pattern of the complementary sequence (3'5')