Exemplo n.º 1
0
def main(options):
    """
    @param input_csv: e.g. GSE_species_GSM.csv
    """
    input_csv = options.input_csv
    outdir = gen_outdir(options)
    soft_outdir = gen_soft_outdir(outdir)
    download_soft(input_csv, soft_outdir)
Exemplo n.º 2
0
 def test_gen_outdir_with_specified_outdir(self, mock_mkdir):
     p = rp_prep.get_parser()
     options = p.parse_args(['gen-csv', '-f', 'any_dir/input.csv', '--outdir', 'specified_outdir'])
     self.assertEqual('specified_outdir', gen_csv.gen_outdir(options))        
     mock_mkdir.called_once_with('specified_outdir')
Exemplo n.º 3
0
 def test_gen_outdir_as_temp_outdir(self):
     self.assertEqual(self.temp_outdir,
                      os.path.abspath(gen_csv.gen_outdir(self.options2)))
Exemplo n.º 4
0
 def test_gen_outdir_without_specified_outdir(self, mock_mkdir):
     p = rp_prep.get_parser()
     options = p.parse_args(['gen-csv', '-f', 'any_dir/input.csv'])
     self.assertEqual('any_dir', gen_csv.gen_outdir(options))
     self.assertFalse(mock_mkdir.called, "mkdir shouldn't have been called with -f is specified")
Exemplo n.º 5
0
 def test_gen_outdir_as_dirname_of_input_csv(self):
     self.assertEqual(os.path.dirname(__file__),
                      # since __file__ contains absolute path
                      os.path.abspath(gen_csv.gen_outdir(self.options1)))