Esempio n. 1
0
 def test_parse_sam(self):
     for case in self.cases:
         df = parse_sam(case.exp.sam)
         df.to_csv(case.exp.sam_df, sep='\t', index=False)
         df.to_csv(case.obs.sam_df, sep='\t', index=False)
         self.assertTrue(
             cmp(case.exp.sam_df, case.obs.sam_df, shallow=False))
Esempio n. 2
0
 def test_filter_best(self):
     for case in self.cases:
         df = parse_sam(case.exp.sam)
         df_filter = filter_best(df)
         df_filter.to_csv(case.exp.sam_best, sep='\t', index=False)
         df_filter.to_csv(case.obs.sam_best, sep='\t', index=False)
         self.assertTrue(
             cmp(case.exp.sam_best, case.obs.sam_best, shallow=False))
Esempio n. 3
0
    def test_filter_ident_overlap(self):
        for case in self.cases:
            df = parse_sam(case.exp.sam)
            df_filter = filter_ident_overlap(df, pident=90, overlap=5)
            df_filter.to_csv(case.exp.sam_io5, sep='\t', index=False)
            df_filter.to_csv(case.obs.sam_io5, sep='\t', index=False)
            self.assertTrue(
                cmp(case.exp.sam_io5, case.obs.sam_io5, shallow=False))

            df_filter = filter_ident_overlap(df, pident=90, overlap=12)
            df_filter.to_csv(case.exp.sam_io12, sep='\t', index=False)
            df_filter.to_csv(case.obs.sam_io12, sep='\t', index=False)
            self.assertTrue(
                cmp(case.exp.sam_io12, case.obs.sam_io12, shallow=False))