Exemple #1
0
def m80_Fasta():
    '''
        Create a Fasta which doesn't get 
        returned. Access the Fasta through
        the m80 API
    '''
    # delete the onl
    m80tools.delete('Fasta','ACGT',force=True)
    f = Fasta.from_file('ACGT','raw/ACGT.fasta')
    return True
Exemple #2
0
def testRefGen():
    # We have to build it
    if m80tools.available('RefLoci', 'Zm5bFGS'):
        x = RefLoci('Zm5bFGS')
    else:
        m80tools.delete('RefLoci', 'Zm5bFGS', force=True)
        gff = os.path.expanduser(os.path.join('raw', 'ZmB73_5b_FGS.gff.gz'))
        x = RefLoci('Zm5bFGS')
        if len(x) == 0:
            x.import_gff(gff)
    x.set_primary_feature_type('gene')
    return x
Exemple #3
0
def simpleRefLoci():
    m80tools.delete('RefLoci','simpleRefLoci',force=True)
    # Create a Locus
    a = Locus(1,100,150, id='gene_a')
    # Create a couple more!
    b = Locus(1,160,175, id='gene_b')
    c = Locus(1,180,200, id='gene_c')
    d = Locus(1,210,300, id='gene_d')
    e = Locus(2,100,150, id='gene_e')

    x = RefLoci('simpleRefLoci')
    x.add_loci([a,b,c,d,e])
    return x
Exemple #4
0
def testRefGen():
    # We have to build it
    m80tools.delete('RefLoci','Zm5bFGS',force=True)
    gff = os.path.expanduser(
        os.path.join(
            'raw', 'ZmB73_5b_FGS.gff.gz'
        )
    )
    x = RefLoci('Zm5bFGS')
    if len(x) == 0:
        x.add_gff(  
            gff
        )
    return x
Exemple #5
0
def smpl_fasta():                                                                  
    ''' A simple fasta that agrees with smpl_annot'''                           
    m80tools.delete('Fasta','smpl_fasta',force=True)
    fasta = Fasta('smpl_fasta')                                                             
    chr1 = Chromosome('chr1','A'*500000)                                                  
    chr2 = Chromosome('chr2','C'*500000)                                               
    chr3 = Chromosome('chr3','G'*500000)                                               
    chr4 = Chromosome('chr4','T'*500000)                                                  
    fasta.add_chrom(chr1)                                                
    fasta.add_chrom(chr2)                                                
    fasta.add_chrom(chr3)                                                
    fasta.add_chrom(chr4)                                                
    fasta._add_nickname('chr1','CHR1')
    fasta._add_attribute('chr1','foobar')
    return fasta  
Exemple #6
0
def test_available_bool(simpleCohort):
    assert Tools.available(dtype='Cohort',name='TestCohort') == True
Exemple #7
0
def test_available():
    Tools.available()
Exemple #8
0
def test_unavailable_bool(simpleCohort):
    assert Tools.available(dtype='Cohort', name='ERROR') == False
Exemple #9
0
def test_available():
    Tools.available()
Exemple #10
0
def test_available_bool(simpleCohort):
    assert Tools.available(dtype="Cohort", name="TestCohort") == True
Exemple #11
0
def test_get_files():
    Tools.get_files()
Exemple #12
0
def test_get_fullpath_files():
    Tools.get_files(fullpath=True)
Exemple #13
0
def test_unavailable_bool(simpleCohort):
    assert Tools.available(dtype='Cohort',name='ERROR') == False
Exemple #14
0
def test_available_bool(simpleCohort):
    assert Tools.available(dtype='Cohort', name='TestCohort') == True
Exemple #15
0
def test_get_fullpath_files():
    Tools.get_files(fullpath=True)
Exemple #16
0
def test_get_files():
    Tools.get_files()
Exemple #17
0
def test_unavailable_bool(simpleCohort):
    assert Tools.available(dtype="Cohort", name="ERROR") == False