Example #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
    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
Example #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)
Example #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
Example #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
Example #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
Example #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
Example #8
0
    def _prepObj(self, args):
        simArgs = self._makeArguments(args)
        simArgs.pltcfg = PlotConfig.fromParserArgs(simArgs)

        return SquigglePlotter(simArgs)
Example #9
0
    def _prepObj(self, args):

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

        return SecondaryAlignmentAnalysis(simArgs)
    def _prepObj(self, args):

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

        return FoldChangeTopRegulatedAnalysis(simArgs)
Example #11
0
    def _prepObj(self, args):
        simArgs = self._makeArguments(args)
        simArgs.pltcfg = PlotConfig.fromParserArgs(simArgs)

        return QualityPosition(simArgs)
Example #12
0
    def _prepObj(self, args):

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

        return SimilarityAnalysis(simArgs)
Example #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
    def _prepObj(self, args):

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

        return FoldChangeSimilarity(simArgs)