Ejemplo n.º 1
0
 def only_primary_isoforms():
     return argument_parameters(
         '-o',
         '--only_primary_isoforms',
         action='store_true',
         help='Restrict export to primary isoforms',
     )
Ejemplo n.º 2
0
 def paths():
     return argument_parameters(
         '--paths',
         nargs='*',
         metavar='',
         help='A path(s) for export file(s)',
     )
Ejemplo n.º 3
0
 def type():
     return argument_parameters(
         '-t',
         '--type',
         choices=['proteomic', 'genomic_ptm'],
         help=
         'What type of mutations should be exported: proteomic or genomic_ptm (genomic affecting PTM).'
         'By default proteomic mutations will be exported',
     )
Ejemplo n.º 4
0
 def restrict_to():
     return argument_parameters(
         '--restrict_to',
         '-r',
         default=None,
         choices=['genome_proteome', 'aminoacid_refseq'],
         help=
         'Should only genome_proteome or aminoacid_refseq mappings be imported?'
     )
Ejemplo n.º 5
0
 def exporters():
     data_exporters = EXPORTERS
     return argument_parameters(
         '-e',
         '--exporters',
         nargs='*',
         help=('What should be exported?'
               ' Available: ' + ', '.join(data_exporters) + '.'
               ' By default everything will be exported.'),
         choices=data_exporters,
         metavar='',
         default=data_exporters,
     )
Ejemplo n.º 6
0
    def models(self):

        models = get_all_models('bio')

        return argument_parameters('--models',
                                   '-m',
                                   nargs='+',
                                   metavar='',
                                   help=('Names of models to be removed.'
                                         ' Available models: ' +
                                         ', '.join(models) + '.'),
                                   default=[],
                                   choices=models.keys())
Ejemplo n.º 7
0
    def sources():
        mutation_importers = muts_import_manager.names

        return argument_parameters(
            '-s',
            '--sources',
            nargs='*',
            help=('Which mutations should be loaded or removed?'
                  ' Available sources are: ' + ', '.join(mutation_importers) +
                  '.'
                  ' By default all sources will be used.'),
            choices=mutation_importers,
            metavar='',
            default=mutation_importers)
Ejemplo n.º 8
0
    def models():

        models = get_all_models('bio')

        models_names = [model.__name__ for model in models]

        return argument_parameters('--models',
                                   '-m',
                                   nargs='+',
                                   metavar='',
                                   help=('Names of models to be removed.'
                                         ' Available models: ' +
                                         ', '.join(models_names) + '.'),
                                   choices=models_names)
Ejemplo n.º 9
0
 def importers_choice(data_importers):
     return argument_parameters(
         '-i',
         '--importers',
         nargs='*',
         help=('What should be imported?'
               ' Available choices are: ' + ', '.join(data_importers) + '.'
               ' By default all data will be imported.'
               ' The order of imports matters; preferable order'
               ' is the same as order of choices listed above.'),
         choices=data_importers,
         metavar='',
         default=data_importers,
     )
Ejemplo n.º 10
0
 def path():
     return argument_parameters(
         '--path',
         type=str,
         default='',
         help='A path to dir where mappings dbs should be created')
Ejemplo n.º 11
0
 def all(self):
     return argument_parameters('--all',
                                '-a',
                                action='store_true',
                                help='Remove all bio models.')