本文整理汇总了Java中org.biojava.nbio.alignment.template.SequencePair类的典型用法代码示例。如果您正苦于以下问题:Java SequencePair类的具体用法?Java SequencePair怎么用?Java SequencePair使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SequencePair类属于org.biojava.nbio.alignment.template包,在下文中一共展示了SequencePair类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: align
import org.biojava.nbio.alignment.template.SequencePair; //导入依赖的package包/类
@Nonnull
public SequenceAlignment<S, C> align(@Nonnull S a, @Nonnull S b) {
PairwiseSequenceAligner<S, C> aligner = Alignments.getPairwiseAligner(a, b, m_type, m_gapPenalty, m_matrix);
//noinspection ConstantConditions
if (aligner == null) {
throw new RuntimeException("Couldn't create aligner; something is wrong in Biojava");
}
// this actually performs the alignment; do it first
SequencePair<S, C> pair = aligner.getPair();
return new SequenceAlignment<>(toIntExact(aligner.getScore()), aligner.getSimilarity(), pair);
}
示例2: alignPairLocal
import org.biojava.nbio.alignment.template.SequencePair; //导入依赖的package包/类
private static void alignPairLocal(String id1, String id2) throws Exception {
ProteinSequence s1 = new ProteinSequence("METSSSLPLSPISIEPEQPSHRDYDITTRRGVGTTGNPIELCTNHFNVSVRQPDVVFYQY" +
"TVSITTENGDAVDGTGISRKLMDQLFKTYSSDLDGKRLAYDGEKTLYTVGPLPQNEFDFL" +
"VIVEGSFSKRDCGVSDGGSSSGTCKRSKRSFLPRSYKVQIHYAAEIPLKTVLGTQRGAYT" +
"PDKSAQDALRVLDIVLRQQAAERGCLLVRQAFFHSDGHPMKVGGGVIGIRGLHSSFRPTH" +
"GGLSLNIDVSTTMILEPGPVIEFLKANQSVETPRQIDWIKAAKMLKHMRVKATHRNMEFK" +
"IIGLSSKPCNQQLFSMKIKDGEREVPIREITVYDYFKQTYTEPISSAYFPCLDVGKPDRP" +
"NYLPLEFCNLVSLQRYTKPLSGRQRVLLVESSRQKPLERIKTL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KMSSLPDQHIKQSKLVLTEYL" +
"KLGDQPANRQMDAFRVSLKSIQPIVTNAHWLSPPDMKFANNQLYSLNPTRGVRFQTNGKF" +
"VMPARVKSVTIINYDKEFNRNVDMFAEGLAKHCSEQGMKFDSRPNSWKKVNLGSSDRRGT" +
"KVEIEEAIRNGVTIVFGIIAEKRPDMHDILKYFEEKLGQQTIQISSETADKFMRDHGGKQ" +
"TIDNVIRKLNPKCGGTNFLIDVPESVGHRVVCNNSAEMRAKLYAKTQFIGFEMSHTGART" +
"RFDIQKVMFDGDPTVVGVAYSLKHSAQLGGFSYFQESRLHKLTNLQEKMQICLNAYEQSS" +
"SYLPETVVVYRVGSGEGDYPQIVNEVNEMKLAARKKKHGYNPKFLVICTQRNSHIRVFPE" +
"HINERGKSMEQNVKSGTCVDVPGASHGYEEFILCCQTPLIGTVKPTKYTIIVNDCRWSKN" +
"EIMNVTYHLAFAHQVSYAPPAIPNVSYAAQNLAKRGHNNYKTHTKLVDMNDYSYRIKEKH" +
"EEIISSEEVDDILMRDFIETVSNDLNAMTINGRNFWA");
SubstitutionMatrix<AminoAcidCompound> matrix = SimpleSubstitutionMatrix.getBlosum62();
SequencePair<ProteinSequence, AminoAcidCompound> pair = Alignments.getPairwiseAlignment(s1, s2,
Alignments.PairwiseSequenceAlignerType.LOCAL, new SimpleGapPenalty(), matrix);
System.out.printf("%n%s vs %s%n%s", pair.getQuery().getAccession(), pair.getTarget().getAccession(), pair);
}
示例3: SequenceAlignment
import org.biojava.nbio.alignment.template.SequencePair; //导入依赖的package包/类
public SequenceAlignment(int score, double similarity, @Nonnull SequencePair<S, C> sequencePair) {
m_score = score;
m_similarity = similarity;
m_sequencePair = sequencePair;
}
示例4: getSequencePair
import org.biojava.nbio.alignment.template.SequencePair; //导入依赖的package包/类
@Nonnull
public SequencePair<S, C> getSequencePair() {
return m_sequencePair; // immutable; don't make a defensive copy
}
示例5: SequenceAlignmentWithPvalue
import org.biojava.nbio.alignment.template.SequencePair; //导入依赖的package包/类
public SequenceAlignmentWithPvalue(int score, @Nonnegative double similarity, @Nonnegative double pvalue, @Nonnull SequencePair<S, C> sequencePair) {
super(score, similarity, sequencePair);
m_pvalue = pvalue;
}
示例6: getAlignment
import org.biojava.nbio.alignment.template.SequencePair; //导入依赖的package包/类
public SequencePair<ProteinSequence, AminoAcidCompound> getAlignment() {
return alignment;
}