utils/infernal_utils.py
def infernal_to_full_region(inf_output_file, dest_dir, filename=None):
    """
    Parses Inferna's detailed output (-o option) and generates a file in tabular format, which is
    compatible with the full_region table

    inf_output_file: Infernal's output file (-o option)
    dest_dir: The path to the output directory
    filename: A filename for the output

    returns: Void
    """

    scores = infernal_output_parser(inf_output_file, ss_notation="wuss")

    if dest_dir is None:
        dest_dir = os.path.split(inf_output_file)[0]

    if filename is None:
        filename = os.path.basename(inf_output_file).partition('.')[0]

    fp_out = open(os.path.join(dest_dir, filename + '.txt'), 'w')

    for score in scores:
        fp_out.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (score["rfam_acc"],
                                                                       score["rfamseq_acc"],
                                                                       score["start"],
                                                                       score["end"],
                                                                       score["bit_score"],
                                                                       score["e_value"],
                                                                       score["cm_start"],
                                                                       score["cm_end"],
                                                                       score["truncated"],
                                                                       "full", '1'))
    fp_out.close()

    Parses Inferna's detailed output (-o option) and generates a file in tabular format, which is
    compatible with the full_region table

    inf_output_file: Infernal's output file (-o option)
    dest_dir: The path to the output directory
    filename: A filename for the output

    returns: Void
    
Parses Inferna's detailed output (-o option) and generates a file in tabular format, which is
compatible with the full_region table

Infernal's output file (-o option)
dest_dir: The path to the output directory
filename: A filename for the output

Void
Parses Inferna ' s detailed output ( - o option ) and generates a file in tabular format which is compatible with the full_region table Infernal ' s output file ( - o option ) dest_dir : The path to the output directory filename : A filename for the output Void
def infernal_to_full_region(inf_output_file, dest_dir, filename=None):
    scores = infernal_output_parser(inf_output_file, ss_notation="wuss")
    if dest_dir is None:
        dest_dir = os.path.split(inf_output_file)[0]
    if filename is None:
        filename = os.path.basename(inf_output_file).partition('.')[0]
    fp_out = open(os.path.join(dest_dir, filename + '.txt'), 'w')
    for score in scores:
        fp_out.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (score["rfam_acc"],
                                                                       score["rfamseq_acc"],
                                                                       score["start"],
                                                                       score["end"],
                                                                       score["bit_score"],
                                                                       score["e_value"],
                                                                       score["cm_start"],
                                                                       score["cm_end"],
                                                                       score["truncated"],
                                                                       "full", '1'))
    fp_out.close()
def infernal_to_full_region ( inf_output_file , dest_dir , filename = None ) : scores = infernal_output_parser ( inf_output_file , ss_notation = "wuss" ) if dest_dir is None : dest_dir = os . path . split ( inf_output_file ) [ 0 ] if filename is None : filename = os . path . basename ( inf_output_file ) . partition ( '.' ) [ 0 ] fp_out = open ( os . path . join ( dest_dir , filename + '.txt' ) , 'w' ) for score in scores : fp_out . write ( "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % ( score [ "rfam_acc" ] , score [ "rfamseq_acc" ] , score [ "start" ] , score [ "end" ] , score [ "bit_score" ] , score [ "e_value" ] , score [ "cm_start" ] , score [ "cm_end" ] , score [ "truncated" ] , "full" , '1' ) ) fp_out . close ( )
Parses Inferna's detailed output (-o option) and generates a file in tabular format, which is
compatible with the full_region table
Parses Inferna ' s detailed output ( - o option ) and generates a file in tabular format which is compatible with the full_region table
"""
    Parses Inferna's detailed output (-o option) and generates a file in tabular format, which is
    compatible with the full_region table

    inf_output_file: Infernal's output file (-o option)
    dest_dir: The path to the output directory
    filename: A filename for the output

    returns: Void
    """
inf_output_file
dest_dir
filename