Exemplo n.º 1
0
def get_other_consensi_seqrun(dataset, samplename, fragment, VERBOSE=0):
    '''Get consensi of other samples except the focal one'''
    consensi = []
    for (samplename_other, sample) in dataset.samples.iterrows():
        if samplename_other == samplename:
            continue

        sample = SampleSeq(sample)
        ref_fn = sample.get_consensus_filename(fragment)
        if not os.path.isfile(ref_fn):
            if VERBOSE >= 3:
                print samplename_other + ': consensus for fragment ' + fragment + ' not found, skipping'
            continue
        consensi.append(SeqIO.read(ref_fn, 'fasta'))
    return consensi
def get_other_consensi_seqrun(dataset, samplename, fragment, VERBOSE=0):
    '''Get consensi of other samples except the focal one'''
    consensi = []
    for (samplename_other, sample) in dataset.samples.iterrows():
        if samplename_other == samplename:
            continue

        sample = SampleSeq(sample)
        ref_fn = sample.get_consensus_filename(fragment)
        if not os.path.isfile(ref_fn):
            if VERBOSE >= 3:
                print samplename_other+': consensus for fragment '+fragment+' not found, skipping'
            continue
        consensi.append(SeqIO.read(ref_fn, 'fasta'))
    return consensi