How to use the pygtftk.arg_formatter.CheckChromFile function in pygtftk

To help you get started, we’ve selected a few pygtftk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dputhier / pygtftk / pygtftk / plugins / mk_matrix.py View on Github external
type=arg_formatter.ranged_num(lowest=0, highest=None,
                                                          val_type="int", linc=True),
                            required=False)

    parser_grp.add_argument('-d', '--downstream',
                            help="Extend the region of interest in 3' by a given value.",
                            default=1000,
                            type=arg_formatter.ranged_num(lowest=0, highest=None,
                                                          val_type="int", linc=True),
                            required=False)

    parser_grp.add_argument('-c', '--chrom-info',
                            help='Tabulated file (chr as '
                                 'column 1, sizes as column 2.)',
                            default=None,
                            action=CheckChromFile,
                            required=True)

    parser_grp.add_argument('-w', '--bin-nb',
                            help='Split the region into w bins.',
                            default=100,
                            type=arg_formatter.ranged_num(lowest=1, highest=None,
                                                          val_type="int", linc=True),
                            required=False)

    parser_grp.add_argument('-k', '--nb-proc',
                            help='Use this many threads to compute coverage.',
                            default=1,
                            type=arg_formatter.ranged_num(lowest=1, highest=None,
                                                          val_type="int", linc=True),
                            required=False)
github dputhier / pygtftk / pygtftk / plugins / coverage.py View on Github external
required=False,
                            type=arg_formatter.FormattedFile(mode='r', file_ext=('bed', 'gtf', 'gtf.gz')))

    parser_grp.add_argument('-o', '--outputfile',
                            help="Output file.",
                            default=sys.stdout,
                            metavar="TXT",
                            type=arg_formatter.FormattedFile(mode='w', file_ext='txt'))

    parser_grp.add_argument('-c', '--chrom-info',
                            help="Tabulated two-columns file. Chromosomes"
                                 " as column 1 and sizes as"
                                 " column 2 ",
                            default=None,
                            metavar="CHROMINFO",
                            action=CheckChromFile,
                            required=True)

    parser_grp.add_argument('-u', '--upstream',
                            help="Extend the regions in 5' by a given value (int).",
                            default=0,
                            metavar="UPSTREAM",
                            type=int,
                            required=False)

    parser_grp.add_argument('-d', '--downstream',
                            help="Extend the regions in 3' by a given value (int).",
                            default=0,
                            metavar="DOWNSTREAM",
                            type=int,
                            required=False)
github dputhier / pygtftk / pygtftk / plugins / great_reg_domains.py View on Github external
required=False)

    parser_grp.add_argument('-c', '--chrom-info',
                            help="Tabulated two-columns file. "
                                 "Chromosomes as column 1, sizes as column 2",
                            default=None,
                            metavar="TXT",
                            action=arg_formatter.CheckChromFile,
                            required=True)

    parser_grp.add_argument('-m', '--mode',
                            help="The type of 'association rule'. ",
                            default="basal_plus_extension",
                            choices=["basal_plus_extension"],
                            metavar="TXT",
                            action=arg_formatter.CheckChromFile,
                            required=False)

    parser_grp.add_argument('-p1', '--http-proxy',
                            help='Use this http proxy (not tested/experimental).',
                            default='',
                            type=str,
                            required=False)

    parser_grp.add_argument('-p2', '--https-proxy',
                            help='Use this https proxy (not tested/experimental).',
                            default='',
                            type=str,
                            required=False)

    return parser
github dputhier / pygtftk / pygtftk / plugins / great_reg_domains.py View on Github external
default=1000,
                            type=int,
                            required=False)

    parser_grp.add_argument('-t', '--distal',
                            help="Maximum extension in one direction",
                            default=1000000,
                            type=int,
                            required=False)

    parser_grp.add_argument('-c', '--chrom-info',
                            help="Tabulated two-columns file. "
                                 "Chromosomes as column 1, sizes as column 2",
                            default=None,
                            metavar="TXT",
                            action=arg_formatter.CheckChromFile,
                            required=True)

    parser_grp.add_argument('-m', '--mode',
                            help="The type of 'association rule'. ",
                            default="basal_plus_extension",
                            choices=["basal_plus_extension"],
                            metavar="TXT",
                            action=arg_formatter.CheckChromFile,
                            required=False)

    parser_grp.add_argument('-p1', '--http-proxy',
                            help='Use this http proxy (not tested/experimental).',
                            default='',
                            type=str,
                            required=False)
github dputhier / pygtftk / pygtftk / plugins / divergent.py View on Github external
metavar="GTF",
                            type=arg_formatter.FormattedFile(mode='r', file_ext=('gtf', 'gtf.gz')))

    parser_grp.add_argument('-o', '--outputfile',
                            help="Output file.",
                            default=sys.stdout,
                            metavar="GTF",
                            type=arg_formatter.FormattedFile(mode='w', file_ext=('gtf')))

    parser_grp.add_argument('-c', '--chrom-info',
                            help="Tabulated two-columns file. Chromosomes"
                                 " as column 1 and their sizes as"
                                 " column 2",
                            default=None,
                            metavar="CHROMINFO",
                            action=CheckChromFile,
                            required=True)

    parser_grp.add_argument('-u', '--upstream',
                            help="Extend the promoter in 5' by a given value (int)."
                                 " Defines the region around the tss.",
                            default=1500,
                            metavar="UPSTREAM",
                            type=int,
                            required=False)

    parser_grp.add_argument('-d', '--downstream',
                            help="Extend the region in 3' by a given value (int)."
                                 " Defines the region around the tss.",
                            default=1500,
                            metavar="DOWNSTREAM",
                            type=int,
github dputhier / pygtftk / pygtftk / plugins / shift.py View on Github external
parser_grp.add_argument('-d', '--stranded',
                            help="By default shift not .",
                            action="store_true")

    parser_grp.add_argument('-a', '--allow-outside',
                            help="Accept the partial or total disappearance of a feature upon shifting.",
                            action="store_true")

    parser_grp.add_argument('-c', '--chrom-info',
                            help="Tabulated two-columns file. Chromosomes"
                                 " as column 1 and sizes as"
                                 " column 2 ",
                            default=None,
                            metavar="CHROMINFO",
                            action=CheckChromFile,
                            required=True)

    return parser
github dputhier / pygtftk / pygtftk / plugins / ologram.py View on Github external
# --------------------- Main arguments ----------------------------------- #

    parser_grp.add_argument('-i', '--inputfile',
                            help="Path to the GTF file. Defaults to STDIN",
                            default=sys.stdin,
                            metavar="GTF",
                            type=arg_formatter.FormattedFile(mode='r', file_ext=('gtf', 'gtf.gz')),
                            required=False)

    parser_grp.add_argument('-c', '--chrom-info',
                            help="Tabulated two-columns file. "
                                 "Chromosomes as column 1, sizes as column 2",
                            default=None,
                            metavar="TXT",
                            action=arg_formatter.CheckChromFile,
                            required=False)

    parser_grp.add_argument('-p', '--peak-file',
                            help='The file containing the peaks/regions to be annotated.'
                                 ' (bed format).',
                            default=None,
                            metavar="BED",
                            type=arg_formatter.FormattedFile(mode='r', file_ext='bed'),
                            required=True)

    # --------------------- More regions ------------------------------------- #

    parser_grp.add_argument('-b', '--more-bed',
                            help="A list of bed files to be considered as additional genomic annotations.",
                            type=arg_formatter.FormattedFile(mode='r', file_ext='bed'),
                            nargs='*',
github dputhier / pygtftk / pygtftk / plugins / closest_gn_to_feat.py View on Github external
type=arg_formatter.ranged_num(lowest=0, highest=None,
                                                          val_type="int", linc=True),
                            required=False)

    parser_grp.add_argument('-u', '--uncollapse',
                            help='Write one peak to gene/distance per line (no comma separated list).',
                            action="store_true")

    parser_grp.add_argument('-g', '--gene-centric',
                            help='Print --feature-type coordinate and the peak list and associated distance.',
                            action="store_true")

    parser_grp.add_argument('-c', '--chrom-info',
                            help='Tabulated file (chr as column 1, sizes as column 2.)',
                            default=None,
                            action=CheckChromFile,
                            required=True)

    return parser
github dputhier / pygtftk / pygtftk / plugins / intergenic.py View on Github external
metavar="GTF",
                            type=arg_formatter.FormattedFile(mode='r', file_ext=('gtf', 'gtf.gz')))

    parser_grp.add_argument('-o', '--outputfile',
                            help="Output file (BED).",
                            default=sys.stdout,
                            metavar="BED",
                            type=arg_formatter.FormattedFile(mode='w', file_ext='bed'))

    parser_grp.add_argument('-c', '--chrom-info',
                            help="Tabulated two-columns file. Chromosomes"
                                 " as column 1 and their sizes as"
                                 " column 2",
                            default=None,
                            metavar="CHROMINFO",
                            action=CheckChromFile,
                            required=True)

    return parser
github dputhier / pygtftk / pygtftk / plugins / overlapping.py View on Github external
metavar="GTF",
                            type=arg_formatter.FormattedFile(mode='r', file_ext=('gtf', 'gtf.gz')))

    parser_grp.add_argument('-o', '--outputfile',
                            help="Output file.",
                            default=sys.stdout,
                            metavar="GTF",
                            type=arg_formatter.FormattedFile(mode='w', file_ext=('gtf')))

    parser_grp.add_argument('-c', '--chrom-info',
                            help="Chromosome information. A tabulated two-columns"
                                 " file with chromosomes as column 1 and sizes as"
                                 " column 2",
                            default=None,
                            metavar="CHROMINFO",
                            action=CheckChromFile,
                            required=True)

    parser_grp.add_argument('-u', '--upstream',
                            help="Extend the region in 5'."
                                 " Used to define the region around the TSS/TTS.",
                            default=1500,
                            metavar="UPSTREAM",
                            type=int,
                            required=False)

    parser_grp.add_argument('-d', '--downstream',
                            help="Extend the region in 3'."
                                 " Used to define the region around the TSS/TTS.",
                            default=1500,
                            metavar="DOWNSTREAM",
                            type=int,