Ejemplo n.º 1
0
 def test_namewithoutpipe_maintained(self):
     self.assertEqual(internal.fix_leaky_pipes('CbirLOC12345'),
                             'CbirLOC12345')
Ejemplo n.º 2
0
 def test_namewithpipe_fixed(self):
     self.assertEqual(internal.fix_leaky_pipes('Cbir|LOC12345'),
                             'Cbir\|LOC12345')
Ejemplo n.º 3
0
    previousseq = ""
    seqdic = {}  # loaded up to remove duplicate sequences
    excluded_genes = config.make_a_list(args.exclude_genes)
    excluded_species = config.make_a_list(args.exclude_species)

    # place any sequences provided in the input into the seqdic
    if args.fasta:
        for defline, seq in internal.parsefasta(args.fasta):
            if sequence_filter(seq, args.maxlength, args.minlength):
                continue
            else:
                seqdic[seq] = defline

    for homolog in sorted(homologlist):
        # remove excluded genes before bothering to look up their sequence:
        searchname = internal.fix_leaky_pipes(homolog)
        if searchname in excluded_genes:
            continue
        if homologlist[homolog][0] in excluded_species:
            continue

        # extract sequences of remaining genes and add to conversion dictionary
        itercount += 1

        for defline, seq, spec in internal.get_gene_fastas(
                genes=[searchname],
                species=homologlist[homolog][0],
                fastafile=None,
                dbpaths=dbpaths,
                specieslist=specieslist,
                comment=str(homologlist[homolog][1]) + str(itercount),
Ejemplo n.º 4
0
 def test_namewithoutpipe_maintained(self):
     self.assertEqual(internal.fix_leaky_pipes('CbirLOC12345'),
                      'CbirLOC12345')
Ejemplo n.º 5
0
 def test_namewithpipe_fixed(self):
     self.assertEqual(internal.fix_leaky_pipes('Cbir|LOC12345'),
                      'Cbir\|LOC12345')
Ejemplo n.º 6
0
    previousseq = ""
    seqdic = {}  # loaded up to remove duplicate sequences
    excluded_genes = config.make_a_list(args.exclude_genes)
    excluded_species = config.make_a_list(args.exclude_species)

    # place any sequences provided in the input into the seqdic
    if args.fasta:
        for defline, seq in internal.parsefasta(args.fasta):
            if sequence_filter(seq, args.maxlength, args.minlength):
                continue
            else:
                seqdic[seq] = defline

    for homolog in sorted(homologlist):
        # remove excluded genes before bothering to look up their sequence:
        searchname = internal.fix_leaky_pipes(homolog)
        if searchname in excluded_genes:
            continue
        if homologlist[homolog][0] in excluded_species:
            continue

        # extract sequences of remaining genes and add to conversion dictionary
        itercount += 1

        for defline, seq, spec in internal.get_gene_fastas(
            genes=[searchname],
            species=homologlist[homolog][0],
            fastafile=None,
            dbpaths=dbpaths,
            specieslist=specieslist,
            comment=str(homologlist[homolog][1]) + str(itercount),