Beispiel #1
0
def l_genes(o_org, o_contig):
    """ creates a small gene set for testing.

        returns a list of 4 genes that belongs
        to the same contig and the same organism."""
    l_genes = []
    c = 10
    for i, gene_id in enumerate([
            "toto",
            "tata",
            "titi",
            "tutu",
            "lolo",
            "lala",
            "lili",
            "lulu",
    ]):
        gene = Gene(gene_id)
        gene.fill_annotations(c, c + 30, "+", position=i)
        gene.fill_parents(o_org, o_contig)
        o_contig.addGene(gene)
        gene.family = GeneFamily(i, gene_id)
        gene.family.addPartition("c-cloud")
        l_genes.append(gene)
        c += 35
    return l_genes
Beispiel #2
0
def l_glist(o_org, o_contig):
    """ creates a small testing context, with 4 CDS, 1 RNA that are all on the same contig in the same organism"""
    l_glist = []
    c = 10
    for i, gene_id in enumerate(["toto", "tata", "titi", "tutu"]):
        gene = Gene(gene_id)
        gene.fill_annotations(c, c + 30, "+", position=i)
        gene.fill_parents(o_org, o_contig)
        o_contig.addGene(gene)
        gene.family = gene_id
        l_glist.append(gene)
        c += 35
    return l_glist