Пример #1
0
    def _addParser(self, subparsers, which):
        parser = subparsers.add_parser(which, help=which + ' help')
        parser.add_argument('-f',
                            '--folders',
                            nargs='+',
                            type=str,
                            help='folders to scan',
                            required=False)
        parser.add_argument('-r',
                            '--reads',
                            nargs='+',
                            type=str,
                            help='minion read folder',
                            required=False)
        parser.add_argument('-mr',
                            '--mreads',
                            nargs='+',
                            type=str,
                            help='multi-read files',
                            required=False)

        parser.add_argument('-p',
                            '--no-plot',
                            action='store_true',
                            default=False)
        parser.add_argument('-u',
                            '--user_run',
                            dest='user_run',
                            action='store_true',
                            default=False)
        parser = PlotConfig.addParserArgs(parser)

        parser.set_defaults(func=self._prepObj)

        return parser
Пример #2
0
    def _addParser(self, subparsers, which):
        parser = subparsers.add_parser(which, help=which+' help')
        parser.add_argument('-d', '--diffreg', nargs='+', type=str, help='poreSTAT diffreg results',
                            required=True)
        parser.add_argument('-m', '--methods', type=str, nargs='+', default=['edgeR', 'DESeq'])

        parser = PlotConfig.addParserArgs(parser)
        parser.set_defaults(func=self._prepObj)

        return parser
Пример #3
0
    def _prepObj(self, args):
        if (not PSToolInterface.hasArgument('counts', args)
                and not PSToolInterface.hasArgument('diffreg', args)) or (
                    args.counts == None and args.diffreg == None):
            raise argparse.ArgumentParser().error(
                "error: Either counts [--counts] or diffreg results [--diffreg] must be set!"
            )

        simArgs = self._makeArguments(args)
        simArgs.pltcfg = PlotConfig.fromParserArgs(simArgs)

        return FoldChangeFeatureCountsAnalysis(simArgs)
Пример #4
0
    def _addParser(self, subparsers, which):
        parser = subparsers.add_parser(which, help=which+' help')
        parser.add_argument('-s', '--sam', nargs='+', type=argparse.FileType('r'), required=True, help='alignment files')
        parser.add_argument('-o', '--output', type=argparse.FileType('w'), help='output location, default: std out', default=sys.stdout)
        parser.add_argument('-a', '--all', default=False, action="store_true")
        parser.add_argument('-f', '--fasta', type=argparse.FileType('r'), help='de table file to read in',
                            required=True)

        parser = PlotConfig.addParserArgs(parser)

        parser.set_defaults(func=self._prepObj)

        return parser
Пример #5
0
    def _addParser(self, subparsers, which):
        parser = subparsers.add_parser(which, help=which+' help')
        parser.add_argument('-s', '--sam', nargs='+', type=argparse.FileType('r'), required=True, help='alignment files')
        parser.add_argument('-g', '--gff', type=argparse.FileType("r"), required=True, help='gene annotation')
        parser.add_argument('-r', '--read-info', nargs='+', type=argparse.FileType('r'), help='read summary file', required=False)
        parser.add_argument('--plot', dest='plot', action='store_true', default=False)
        parser.add_argument('-o', '--output', type=argparse.FileType('w'), help='output location, default: std out', default=sys.stdout)

        parser = PlotConfig.addParserArgs(parser)

        parser.set_defaults(func=self._prepObj)

        return parser
Пример #6
0
    def _addParser(self, subparsers, which):
        parser = subparsers.add_parser(which, help=which + ' help')
        parser.add_argument('-d',
                            '--counts',
                            nargs='+',
                            type=str,
                            help='counts summary file',
                            required=False)
        parser.add_argument('-o',
                            '--output',
                            type=str,
                            help='output location, default: std out',
                            default=None)

        parser = PlotConfig.addParserArgs(parser)
        parser.set_defaults(func=self._prepObj)

        return parser
Пример #7
0
    def _addParser(self, subparsers, which):
        parser = subparsers.add_parser(which, help=which + ' help')
        parser.add_argument('-c',
                            '--counts',
                            nargs='+',
                            type=argparse.FileType('r'),
                            action='append',
                            default=None,
                            help='counts summary file',
                            required=False)
        parser.add_argument('-d',
                            '--diffreg',
                            nargs='+',
                            type=str,
                            default=None,
                            help='poreSTAT diffreg results',
                            required=False)
        parser.add_argument('-v',
                            '--no-analysis',
                            dest='noanalysis',
                            action='store_true',
                            default=False)
        parser.add_argument('-m',
                            '--methods',
                            type=str,
                            nargs='+',
                            default=['NOISeq', 'DESeq', 'msEmpiRe'])

        parser.add_argument('-o',
                            '--output',
                            type=FolderType('w'),
                            help='output location, default: std out',
                            required=True)
        parser.add_argument('-r',
                            '--rscript',
                            type=argparse.FileType('r'),
                            help='path to Rscript',
                            default='/usr/bin/Rscript')

        parser = PlotConfig.addParserArgs(parser)
        parser.set_defaults(func=self._prepObj)

        return parser
Пример #8
0
    def _prepObj(self, args):
        simArgs = self._makeArguments(args)
        simArgs.pltcfg = PlotConfig.fromParserArgs(simArgs)

        return SquigglePlotter(simArgs)
Пример #9
0
    def _prepObj(self, args):

        simArgs = self._makeArguments(args)
        simArgs.pltcfg = PlotConfig.fromParserArgs(simArgs)

        return SecondaryAlignmentAnalysis(simArgs)
Пример #10
0
    def _prepObj(self, args):

        simArgs = self._makeArguments(args)
        simArgs.pltcfg = PlotConfig.fromParserArgs(simArgs)

        return FoldChangeTopRegulatedAnalysis(simArgs)
Пример #11
0
    def _prepObj(self, args):
        simArgs = self._makeArguments(args)
        simArgs.pltcfg = PlotConfig.fromParserArgs(simArgs)

        return QualityPosition(simArgs)
Пример #12
0
    def _prepObj(self, args):

        simArgs = self._makeArguments(args)
        simArgs.pltcfg = PlotConfig.fromParserArgs(simArgs)

        return SimilarityAnalysis(simArgs)
Пример #13
0
    def _addParser(self, subparsers, which):
        parser = subparsers.add_parser(which, help=which + ' help')
        parser.add_argument('-c',
                            '--counts',
                            nargs='+',
                            type=argparse.FileType('r'),
                            default=None,
                            help='counts summary file',
                            required=False)
        parser.add_argument('-p',
                            '--prefixes',
                            nargs='+',
                            type=str,
                            default=None,
                            help='counts summary file',
                            required=False)

        parser.add_argument('-co',
                            '--conditions',
                            nargs='+',
                            type=str,
                            action='append',
                            default=None,
                            help='counts summary file',
                            required=False)

        parser.add_argument('-v',
                            '--no-analysis',
                            dest='noanalysis',
                            action='store_true',
                            default=False)
        parser.add_argument('-m',
                            '--methods',
                            type=str,
                            nargs='+',
                            default=[
                                'DESeq2', 'DirectDESeq2', 'edgeR', 'limma',
                                'msEmpiRe', "nlEmpiRe"
                            ])

        parser.add_argument('-o',
                            '--output',
                            type=FolderType('w'),
                            help='output location, default: std out',
                            required=True)
        parser.add_argument('-r',
                            '--rscript',
                            type=argparse.FileType('r'),
                            help='path to Rscript',
                            default='/usr/bin/Rscript')

        parser.add_argument('-e',
                            '--enhanced',
                            type=argparse.FileType('r'),
                            default=None)
        parser.add_argument('-l',
                            '--lengths',
                            type=argparse.FileType('r'),
                            default=None)

        parser.add_argument('-rrna',
                            '--no-rrna',
                            dest='norrna',
                            action='store_true',
                            default=False)
        parser.add_argument('-rmtrna',
                            '--remove-mtrna',
                            dest='removemtrna',
                            action='store_true',
                            default=False)
        parser.add_argument('-opc',
                            '--only-protein-coding',
                            dest='only_protein_coding',
                            action='store_true',
                            default=False)

        parser.add_argument('-fpkm',
                            '--fpkm',
                            dest='fpkm',
                            action='store_true',
                            default=False)
        parser.add_argument('-tpm',
                            '--tpm',
                            dest='tpm',
                            action='store_true',
                            default=False)
        parser.add_argument('-libsize',
                            '--libsize',
                            dest='libsize',
                            action='store_true',
                            default=False)
        parser.add_argument('-remove-gene-stable',
                            '--remove-gene-stable-identifier',
                            dest='removestable',
                            action='store_true',
                            default=False)

        parser.add_argument('-anc',
                            '--allow-nonexistant-cond',
                            dest='allow_nonexistant_cond',
                            action='store_true',
                            default=False)

        parser = PlotConfig.addParserArgs(parser)
        parser.set_defaults(func=self._prepObj)

        return parser
Пример #14
0
    def _prepObj(self, args):

        simArgs = self._makeArguments(args)
        simArgs.pltcfg = PlotConfig.fromParserArgs(simArgs)

        return FoldChangeSimilarity(simArgs)