def make_parser():
    parser = argparse.ArgumentParser(
        description="Generates a condor dagman script from a provided "
                    "library metadata file."
    )
    parser.add_argument('-o', '--output', default='run.dagman',
                        help='Name to save master dagman too')
    add_metadata_arguments(parser)
    parser.add_argument(
        'other_libraries', nargs='*',
        help="(Deprecated) specify a list of library metadata file names."
    )
    parser.add_argument(
        '-s', '--sep', choices=['TAB', ','], default='TAB',
        help="Specify the field separator character in the library metadata file"
    )
    add_default_path_arguments(parser)
    add_version_argument(parser)
    add_debug_arguments(parser)
    parser.add_argument('--splice-template',
                        help='override splice dagman template')
    parser.add_argument('--collection-template', default='full-encode.dagman',
                        help='override collection dagman template')

    return parser
Exemple #2
0
def make_parser():
    parser = argparse.ArgumentParser()
    parser.add_argument('-w',
                        '--web-root',
                        required=True,
                        help='base url for tracks')
    parser.add_argument('--root',
                        default=os.getcwd(),
                        help='root directory to search for tracks')
    parser.add_argument('--bigwig',
                        action='store_true',
                        default=False,
                        help='generate track blocks for bigwigs')
    parser.add_argument('--bam',
                        action='store_true',
                        default=False,
                        help='generate track blocks for bam files')

    parser.add_argument('-s', '--sep', choices=['TAB', ','], default='TAB')
    parser.add_argument('-l', '--libraries', action='append', default=[])

    add_version_argument(parser)
    add_debug_arguments(parser)

    return parser
def main(cmdline=None):
    parser = ArgumentParser()
    parser.add_argument('-n',
                        '--experiment-name',
                        required=True,
                        help='Experiment name to select')
    add_metadata_arguments(parser)
    add_debug_arguments(parser)
    args = parser.parse_args(cmdline)

    configure_logging(args)

    header_printed = False
    libraries = load_library_tables(args.libraries)
    experiments = load_experiments(args.experiments)

    replicates = experiments.loc[args.experiment_name, 'replicates']

    for i, (library_id,
            library) in enumerate(libraries.loc[replicates].iterrows()):
        filename = find_library_bam_file(library)
        LOGGER.info('  Reading %s %d/%d', filename, i + 1, len(replicates))

        mode = get_mode(filename, 'r')
        with pysam.AlignmentFile(filename, mode) as alignment:
            if not header_printed:
                print(str(alignment.header))
                header_printed = True

            for read in alignment:
                print(read.to_string())
def make_parser():
    parser = argparse.ArgumentParser()
    parser.add_argument('-s', '--sep', choices=['TAB',','], default='TAB')
    parser.add_argument('libraries', nargs='*')
    add_default_path_arguments(parser)
    add_version_argument(parser)
    add_debug_arguments(parser)
    
    return parser
def make_parser():
    parser = ArgumentParser()
    parser.add_argument('--bam', required=True, help='Source bam file')
    parser.add_argument('--prefix', help='set output name prefix')
    parser.add_argument('--stranded',
                        action='store_true',
                        default=False,
                        help='Process as stranded data')
    parser.add_argument('--reference-prefix', default='chr')
    add_default_path_arguments(parser)
    add_debug_arguments(parser)
    return parser
def make_parser():
    parser = argparse.ArgumentParser(
        description="Write combined CSV for gene counts produced by STAR.")
    parser.add_argument('-c', '--strand',
                        choices=['U', '+', '-'],
                        default='U',
                        help='which strand to use.')
    parser.add_argument('-l', '--libraries', action='append', required=True,
                        help='library information table')
    parser.add_argument('-e', '--experiments', action='append', required=True,
                        help='experiment information table')
    parser.add_argument('-s', '--sep', choices=['TAB', ','], default='TAB')
    parser.add_argument('--output-format', choices=['TAB', ','], default=',')
    parser.add_argument('--gtf-cache', help='Specify name of GTF cache file')
    parser.add_argument('--add-names', action='store_true', default=False,
                        help='Add names to ouptut quantification file')
    add_debug_arguments(parser)
    return parser
def make_parser():
    parser = argparse.ArgumentParser(
        description="Write combined CSV for a specific quantification.")
    parser.add_argument('-q', '--quantification',
                        choices=['FPKM', 'TPM', 'expected_count',
                                 'effective_length', 'length'],
                        default='FPKM',
                        help='which quantification value to use')
    parser.add_argument('-l', '--libraries', action='append', required=True,
                        help='library information table')
    parser.add_argument('-e', '--experiments', action='append', required=True,
                        help='experiment information table')
    parser.add_argument('-s', '--sep', choices=['TAB', ','], default='TAB')
    parser.add_argument('--output-format', choices=['TAB', ','], default=',')
    parser.add_argument('--transcriptome', action='store_true', default=False,
                        help='Use RSEM transcriptome quantifications instead of genomic quantifications')
    parser.add_argument('--gtf-cache', help='Specify name of GTF cache file')
    parser.add_argument('--add-names', action='store_true', default=False,
                        help='Add names to ouptut quantification file')
    add_debug_arguments(parser)
    return parser
def make_parser():
    parser = argparse.ArgumentParser(description="Write combined CSV for a specific quantification.")
    parser.add_argument(
        "-q",
        "--quantification",
        choices=["FPKM", "TPM", "expected_count", "effective_length", "length"],
        default="FPKM",
        help="which quantification value to use",
    )
    parser.add_argument("-l", "--libraries", action="append", help="library information table")
    parser.add_argument("-e", "--experiments", action="append", help="experiment information table")
    parser.add_argument("-s", "--sep", choices=["TAB", ","], default="TAB")
    parser.add_argument("--output-format", choices=["TAB", ","], default=",")
    parser.add_argument(
        "--transcriptome",
        action="store_true",
        default=False,
        help="Use RSEM transcriptome quantifications instead of genomic quantifications",
    )
    add_debug_arguments(parser)
    return parser
def make_parser():
    parser = argparse.ArgumentParser(
        description=
        "Write combined CSV for a specific quantification produced by RSEM.")
    parser.add_argument('-q',
                        '--quantification',
                        choices=[
                            'FPKM', 'TPM', 'expected_count',
                            'effective_length', 'length'
                        ],
                        default=[],
                        action='append',
                        help='which quantification value to use')
    parser.add_argument('-l',
                        '--libraries',
                        action='append',
                        required=True,
                        help='library metadata table')
    parser.add_argument('-e',
                        '--experiments',
                        action='append',
                        required=True,
                        help='experiment metadata table')
    parser.add_argument('-s', '--sep', choices=['TAB', ','], default='TAB')
    parser.add_argument('--output-format', choices=['TAB', ','], default=',')
    parser.add_argument(
        '--transcriptome',
        action='store_true',
        default=False,
        help=
        'Use RSEM transcriptome quantifications instead of genomic quantifications'
    )
    parser.add_argument('--genome-dir', help='Specify genome directory root')
    parser.add_argument(
        '--add-names',
        action='store_true',
        default=False,
        help='Add names to ouptut quantification file, requires --gtf-cache')
    add_debug_arguments(parser)
    return parser
def make_parser():
    parser = argparse.ArgumentParser()
    parser.add_argument('--genome-dir',
                        required=True,
                        help='root for genome indexes')
    parser.add_argument('-e',
                        '--experiments',
                        action='append',
                        default=[],
                        help='experiments table')
    parser.add_argument('-l',
                        '--libraries',
                        action='append',
                        default=[],
                        help='library information tables')
    parser.add_argument('-n',
                        '--use-experiment',
                        help='plot specific experiment name')
    parser.add_argument('-q',
                        '--quantification',
                        default='TPM',
                        help='Specify quantification type to use')
    parser.add_argument('-o',
                        '--output',
                        default='genesdetected.html',
                        help='output filename')
    parser.add_argument('--gene-type-filter',
                        default=[],
                        action='append',
                        help='GENCODE gene_types to include')
    parser.add_argument('--gene-list-filter',
                        default=None,
                        help='Filename to load a list of IDs to filter on')
    parser.add_argument(
        'filenames',
        nargs='*',
        help='Combined quantification file: libraries by genes')
    add_debug_arguments(parser)
    return parser