当前位置: 首页>>代码示例>>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;未经允许,请勿转载。