Example #1
0
def rename_sequences( sequence_file ):
    records = read_sequences( sequence_file )
    if any([r.name.strip().endswith('|quiver') for r in records]):
        records = [rename_record(r) for r in records]
        output_file = get_output_file( sequence_file )
        write_sequences( records, output_file )
        return output_file
    else:
        return sequence_file
Example #2
0
def exons_to_cDNA( exon_file ):
    """
    Combine a multi-Fasta of Exon sequences into a mock cDNA
    """
    output_type = get_file_type( exon_file )
    output_file = _get_output_file( exon_file, output_type )
    records = _parse_exon_records( exon_file, output_type )
    log.info("Combinging %s exons sequences to cDNA" % len(records))
    if len( records ):
        sorted_records = _sort_records( records )
        cDNA_record = _combine_records( sorted_records )
        log.info("Writing cDNA sequence out to %s" % output_file)
        write_sequences( cDNA_record, output_file )
Example #3
0
def exons_to_cDNA(exon_file):
    """
    Combine a multi-Fasta of Exon sequences into a mock cDNA
    """
    output_type = get_file_type(exon_file)
    output_file = _get_output_file(exon_file, output_type)
    records = _parse_exon_records(exon_file, output_type)
    log.info("Combinging %s exons sequences to cDNA" % len(records))
    if len(records):
        sorted_records = _sort_records(records)
        cDNA_record = _combine_records(sorted_records)
        log.info("Writing cDNA sequence out to %s" % output_file)
        write_sequences(cDNA_record, output_file)