예제 #1
0
 def test_add_analyses_option(self):
     cli = CLI("Test")
     cli.add_analyses_option()
     options,args = cli.parse_args(list())
     self.assertEqual(options.analyses,'all')
     options,args = cli.parse_args(['--analyses=all',])
     self.assertEqual(options.analyses,'all')
     options,args = cli.parse_args(['--analyses=peak_centric',])
     self.assertEqual(options.analyses,'peak_centric')
     options,args = cli.parse_args(['--analyses=gene_centric',])
     self.assertEqual(options.analyses,'gene_centric')
예제 #2
0
 def test_add_edge_option(self):
     cli = CLI("Test")
     cli.add_edge_option()
     options,args = cli.parse_args(list())
     self.assertEqual(options.edge,'tss')
     options,args = cli.parse_args(['--edge=tss',])
     self.assertEqual(options.edge,'tss')
     options,args = cli.parse_args(['--edge=both',])
     self.assertEqual(options.edge,'both')
예제 #3
0
 def test_add_option_group(self):
     cli = CLI("Test")
     cli.add_option_group("Example options")
     cli.add_option('--attempts',
                    dest='attempts',
                    default=0,
                    type=int,
                    help="Number of attempts",
                    group="Example options")
     options,args = cli.parse_args(list())
     self.assertEqual(options.attempts,0)
     options,args = cli.parse_args(['--attempts=11',])
     self.assertEqual(options.attempts,11)
예제 #4
0
 def test_add_summary_option(self):
     cli = CLI("Test")
     cli.add_summary_option()
     options,args = cli.parse_args(list())
     self.assertFalse(options.summary)
     options,args = cli.parse_args(['--summary',])
     self.assertTrue(options.summary)
예제 #5
0
 def test_add_compact_option(self):
     cli = CLI("Test")
     cli.add_compact_option()
     options,args = cli.parse_args(list())
     self.assertFalse(options.compact)
     options,args = cli.parse_args(['--compact',])
     self.assertTrue(options.compact)
예제 #6
0
 def test_name_option(self):
     cli = CLI("Test")
     cli.add_name_option()
     options,args = cli.parse_args(list())
     self.assertEqual(options.name,None)
     options,args = cli.parse_args(['--name=test',])
     self.assertEqual(options.name,"test")
예제 #7
0
 def test_add_promoter_region_option(self):
     cli = CLI("Test")
     cli.add_promoter_region_option()
     options,args = cli.parse_args(list())
     self.assertEqual(options.promoter_region,"1000,100")
     options,args = cli.parse_args(['--promoter_region=1500,200',])
     self.assertEqual(options.promoter_region,"1500,200")
예제 #8
0
 def test_add_number_option(self):
     cli = CLI("Test")
     cli.add_number_option()
     options,args = cli.parse_args(list())
     self.assertEqual(options.max_closest,None)
     options,args = cli.parse_args(['--number=9',])
     self.assertEqual(options.max_closest,9)
예제 #9
0
 def test_add_only_de_option(self):
     cli = CLI("Test")
     cli.add_only_de_option()
     options,args = cli.parse_args(list())
     self.assertFalse(options.only_diff_expressed)
     options,args = cli.parse_args(['--only-DE',])
     self.assertTrue(options.only_diff_expressed)
예제 #10
0
 def test_add_peak_cols_option(self):
     cli = CLI("Test")
     cli.add_peak_cols_option()
     options,args = cli.parse_args(list())
     self.assertEqual(options.peak_cols,None)
     options,args = cli.parse_args(['--peak_cols=3,1,2',])
     self.assertEqual(options.peak_cols,"3,1,2")
예제 #11
0
 def test_peak_id_option(self):
     cli = CLI("Test")
     cli.add_peak_id_option()
     options,args = cli.parse_args(list())
     self.assertEqual(options.peak_id,None)
     options,args = cli.parse_args(['--peak_id=4',])
     self.assertEqual(options.peak_id,4)
예제 #12
0
 def test_feature_option(self):
     cli = CLI("Test")
     cli.add_feature_option()
     options,args = cli.parse_args(list())
     self.assertEqual(options.feature_type,'gene')
     options,args = cli.parse_args(['--feature=transcript',])
     self.assertEqual(options.feature_type,"transcript")
예제 #13
0
 def test_add_xlsx_option(self):
     cli = CLI("Test")
     cli.add_xlsx_option()
     options,args = cli.parse_args(list())
     self.assertFalse(options.xlsx_output)
     options,args = cli.parse_args(['--xlsx',])
     self.assertTrue(options.xlsx_output)
예제 #14
0
 def test_get_version(self):
     cli = CLI("Test",version="v1.0.2")
     self.assertEqual(cli.get_version(),"v1.0.2")