Beispiel #1
0
def test_positive_region3_short_seq():
    "test Rev  9b "
    Genome_seq_record = Genome_sequence["pathogens_Gpal_scaffold_3"]
    intergenic_region = get_len_upstream(Genome_seq_record.seq, 8, "+")
    # this has already been reverse complemented, so we want the
    # seq at the "end" of the ROI.
    assert_equal(intergenic_region, "ATGNNAT")
Beispiel #2
0
def test_negative_region3():
    "test Rev intergenic_region 3 "
    Genome_seq_record = Genome_sequence["pathogens_Gpal_scaffold_2"]
    intergenic_region = get_len_upstream(Genome_seq_record.seq, 3, "-")
    # this has already been reverse complemented, so we want the
    # seq at the "end" of the ROI.
    assert_equal(intergenic_region, "NNN")
Beispiel #3
0
def test_positive_region3_short_seq():
    "test Rev  9d "
    Genome_seq_record = Genome_sequence["pathogens_Gpal_scaffold_3"]
    intergenic_region = get_len_upstream(Genome_seq_record.seq, 14, "+")
    assert_equal(intergenic_region, "ATGNNATG")
Beispiel #4
0
def test_intergenic_region3():
    "test intergenic_region 3 "
    Genome_seq_record = Genome_sequence["pathogens_Gpal_scaffold_1"]
    intergenic_region = get_len_upstream(Genome_seq_record.seq, 3, "+")
    assert_equal(intergenic_region, "GAG")
Beispiel #5
0
            Genome_seq_record = Genome_sequence[scaff]
        else:
            warn = "could not find scaff: %s going to skip" % (scaff)
            logger.warning(warn)
        length_of_contig = len(Genome_seq_record.seq)
        # slice up the scaffold.
        # reverse complement for negative
        # this function gets the entire intergenic regions, regardless of
        # the desired length.
        intergenic_region, final_start, \
               final_stop = slice_up_scaff(Genome_seq_record.seq,
                                           final_start,
                                           final_stop,
                                           direction)
        # this function then get the desired upstream chunk
        upstream_ROI = get_len_upstream(intergenic_region, upstream, direction)
        if description.upper() == "YES":
            info = "Scaff: %s | start-stop: %s:%s %s coding direction" % (
                scaff, final_start, final_stop, direction)
        if len(upstream_ROI) >= min_len:
            write_out_to_file(outfile, gene, upstream, upstream_ROI, info)
        else:
            logger.warn

        write_out_gff(gff_outfile, scaff, final_start, final_stop, direction,
                      gene, upstream)
    logger.info("gff made, this contains all intergenic regions")
    outfile.close()
    gff_outfile.close()
    user_defined_genic = int(user_defined_genic)
    if user_defined_genic != 0: