Пример #1
0
def invoke_check_fasta_gff():
    """
    Parse command-line options then invoke
    :py:func:`riboviz.check_fasta_gff.check_fasta_gff`.
    """
    print(provenance.write_provenance_to_str(__file__))
    options = parse_command_line_options()
    fasta = options.fasta
    gff = options.gff
    check_fasta_gff.check_fasta_gff(fasta, gff)
Пример #2
0
def invoke_subsample_bioseqfile():
    """
    Parse command-line options then invoke
    :py:func:`riboviz.subsample_bioseqfile.subsample_bioseqfile`.
    """
    print(provenance.write_provenance_to_str(__file__))
    options = parse_command_line_options()
    input_file = options.input_file
    output_file = options.output_file
    file_type = options.file_type
    prob = options.prob
    verbose = options.verbose
    subsample_bioseqfile.subsample_bioseqfile(input_file, prob, output_file,
                                              file_type, verbose)
Пример #3
0
def invoke_count_reads():
    """
    Parse command-line options then invoke
    :py:func:`riboviz.count_reads.count_reads`.
    """
    print(provenance.write_provenance_to_str(__file__))
    options = parse_command_line_options()
    config_file = options.config_file
    input_dir = options.input_dir
    tmp_dir = options.tmp_dir
    output_dir = options.output_dir
    reads_file = options.reads_file
    count_reads.count_reads(config_file, input_dir, tmp_dir, output_dir,
                            reads_file)
Пример #4
0
def invoke_trim_5p_mismatch():
    """
    Parse command-line options then invoke
    :py:func:`riboviz.trim_5p_mismatch.trim_5p_mismatch_file`.
    """
    print(provenance.write_provenance_to_str(__file__))
    options = parse_command_line_options()
    sam_file_in = options.sam_file_in
    sam_file_out = options.sam_file_out
    fivep_remove = options.fivep_remove
    max_mismatches = options.max_mismatches
    summary_file = options.summary_file
    trim_5p_mismatch.trim_5p_mismatch_file(sam_file_in,
                                           sam_file_out,
                                           fivep_remove,
                                           max_mismatches,
                                           summary_file)
Пример #5
0
def invoke_demultiplex_fastq():
    """
    Parse command-line options then invoke
    :py:func:`riboviz.demultiplex_fastq.demultiplex`.
    """
    print(provenance.write_provenance_to_str(__file__))
    options = parse_command_line_options()
    sample_sheet_file = options.sample_sheet_file
    read1_file = options.read1_file
    read2_file = options.read2_file
    mismatches = options.mismatches
    out_dir = options.out_dir
    delimiter = options.delimiter
    demultiplex_fastq.demultiplex(sample_sheet_file,
                                  read1_file,
                                  read2_file,
                                  mismatches,
                                  out_dir,
                                  delimiter)
Пример #6
0
def invoke_get_cds_codons():
    """
    Parse command-line options then invoke
    :py:func:`riboviz.get_cds_codons.get_cds_codons_file`.
    """
    print(provenance.write_provenance_to_str(__file__))
    options = parse_command_line_options()
    fasta = options.fasta
    gff = options.gff
    cds_codons = options.cds_codons
    exclude_stop_codons = options.exclude_stop_codons
    cds_feature_format = options.cds_feature_format
    use_feature_name = options.use_feature_name
    try:
        get_cds_codons.get_cds_codons_file(fasta, gff, cds_codons,
                                           exclude_stop_codons,
                                           cds_feature_format,
                                           use_feature_name)
    except FastaIndexingError as e:
        print("{}: {}".format(type(e).__name__, e))
    except FileNotFoundError as e:
        print("{}: {}".format(type(e).__name__, e))
    except ValueError as e:
        print("{}: {}".format(type(e).__name__, e))