當前位置: 首頁>>代碼示例>>Java>>正文


Java SequencePair類代碼示例

本文整理匯總了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);
}
 
開發者ID:dmyersturnbull,項目名稱:sequence-alignment,代碼行數:12,代碼來源:SequenceAligner.java

示例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" +
            "NYLPLEFCNLVSLQRYTKPLSGRQRVLLVESSRQKPLERIKTLNDAMHTYCYDKDPFLAG" +
            "CGISIEKEMTQVEGRVLKPPMLKFGKNEDFQPCNGRWNFNNKMLLEPRAIKSWAIVNFSF" +
            "PCDSSHISRELISCGMRKGIEIDRPFALVEEDPQYKKAGPVERVEKMIATMKLKFPDPPH" +
            "FILCILPERKTSDIYGPWKKICLTEEGIHTQCICPIKISDQYLTNVLLKINSKLGGINSL" +
            "LGIEYSYNIPLINKIPTLILGMDVSHGPPGRADVPSVAAVVGSKCWPLISRYRAAVRTQS" +
            "PRLEMIDSLFQPIENTEKGDNGIMNELFVEFYRTSRARKPKQIIIFRDGVSESQFEQVLK" +
            "IEVDQIIKAYQRLGESDVPKFTVIVAQKNHHTKLFQAKGPENVPAGTVVDTKIVHPTNYD" +
            "FYMCAHAGKIGTSRPAHYHVLLDEIGFSPDDLQNLIHSLSYVNQRSTTATSIVAPVRYAH" +
            "LAAAQVAQFTKFEGISEDGKVPELPRLHENVEGNMFFC");
    ProteinSequence s2 = new ProteinSequence("MDLLDKVMGEMGSKPGSTAKKPATSASSTPRTNVWGTAKKPSSQQQPPKPLFTTPGSQQG" +
            "SLGGRIPKREHTDRTGPDPKRKPLGGLSVPDSFNNFGTFRVQMNAWNLDISKMDERISRI" +
            "MFRATLVHTDGRRFELSLGVSAFSGDVNRQQRRQAQCLLFRAWFKRNPELFKGMTDPAIA" +
            "AYDAAETIYVGCSFFDVELTEHVCHLTEADFSPQEWKIVSLISRRSGSTFEIRIKTNPPI" +
            "YTRGPNALTLENRSELTRIIEAITDQCLHNEKFLLYSSGTFPTKGGDIASPDEVTLIKSG" +
            "FVKTTKIVDRDGVPDAIMTVDTTKSPFYKDTSLLKFFTAKMDQLTNSGGGPRGHNGGRER" +
            "RDGGGNSRKYDDRRSPRDGEIDYDERTVSHYQRQFQDERISDGMLNTLKQSLKGLDCQPI" +
            "HLKDSKANRSIMIDEIHTGTADSVTFEQKLPDGEMKLTSITEYYLQRYNYRLKFPHLPLV" +
            "TSKRAKCYDFYPMELMSILPGQRIKQSHMTVDIQSYMTGKMSSLPDQHIKQSKLVLTEYL" +
            "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);
}
 
開發者ID:CameronTolooee,項目名稱:Mendel,代碼行數:40,代碼來源:ProteinAlignment.java

示例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;
}
 
開發者ID:dmyersturnbull,項目名稱:sequence-alignment,代碼行數:6,代碼來源:SequenceAlignment.java

示例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
}
 
開發者ID:dmyersturnbull,項目名稱:sequence-alignment,代碼行數:5,代碼來源:SequenceAlignment.java

示例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;
}
 
開發者ID:dmyersturnbull,項目名稱:sequence-alignment,代碼行數:5,代碼來源:SequenceAlignmentWithPvalue.java

示例6: getAlignment

import org.biojava.nbio.alignment.template.SequencePair; //導入依賴的package包/類
public SequencePair<ProteinSequence, AminoAcidCompound> getAlignment() {
    return alignment;
}
 
開發者ID:CameronTolooee,項目名稱:Mendel,代碼行數:4,代碼來源:SmithWaterman.java


注:本文中的org.biojava.nbio.alignment.template.SequencePair類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。