Exemple #1
0
    def test_4_query_custom_small_compressed(self):
	""" Query gzip compressed fastq files (less than 20MB).
	"""
        for sample in glob.glob(os.path.join(self.custom_dir, "*.fastq.gz")): 
    	    print "\nQuerying against compressed sample %s" % sample
            if os.path.getsize(os.path.join(self.custom_dir, sample)) < 20*1024*1204:
		facs.query(os.path.join(self.custom_dir, sample),os.path.join(self.bloom_dir, "U00096.2.bloom"))
Exemple #2
0
 def test_3_query_custom(self):
     """ Query against the uncompressed FastQ files files manually deposited in data/custom folder.
     """
     for sample in glob.glob(os.path.join(self.custom_dir, "*.fastq")):
 	    print "\nQuerying against uncompressed sample %s" % sample
         facs.query(os.path.join(self.custom_dir, sample),
                     os.path.join(self.bloom_dir, "U00096.2.bloom"))
Exemple #3
0
 def test_2_query(self):
     """ Generate dummy fastq files.
     """
     for nreads in self.fastq_nreads:
         test_fname = "test%s.fastq" % nreads
         helper._generate_dummy_fastq(os.path.join(self.synthetic_fastq, test_fname), nreads)
         facs.query(os.path.join(self.synthetic_fastq, test_fname),
                     os.path.join(self.bloom_dir, "U00096.2.bloom"))
    def test_query_NA21137_illumina(self):
        """ Query gzip compressed fastq files
        """
        for sample in glob.glob(os.path.join(self.custom_dir, "*.fastq.gz")):
        	sample_path = os.path.join(self.custom_dir, sample)
		for ref in os.listdir(self.reference):
		    bf = os.path.join(self.bloom_dir, os.path.splitext(ref)[0]+".bloom")
		    print(sample_path, bf)
            	    facs.query(sample_path, bf)
Exemple #5
0
 def test_3_query_custom(self):
     """ Query against the uncompressed FastQ files files manually deposited
         in data/custom folder.
     """
     for sample in glob.glob(os.path.join(self.custom_dir, "*.fastq")):
         print "\nQuerying against uncompressed sample %s" % sample
         for ref in os.listdir(self.reference):
             facs.query(os.path.join(self.synthetic_fastq, test_fname),
                        os.path.join(self.bloom_dir, os.path.splitext(ref)[0]+".bloom"))
Exemple #6
0
 def test_2_query_exampledata(self):
     """ Query Innocentive exampledata
     """
     for sample in glob.glob(os.path.join(self.example, "*.fq")):
         print "\nQuerying against example dataset %s" % sample
         for ref in os.listdir(self.reference):
             example = os.path.join(self.example, sample)
             bf = os.path.join(self.bloom_dir, os.path.splitext(ref)[0]+".bloom")
             print(example, bf)
             facs.query(example, bf)
Exemple #7
0
 def test_2_query_testdata(self):
     """ Query Innocentive testdata
     """
     for sample in glob.glob(os.path.join(self.testing, "*.fq")):
         print "\nQuerying against testing dataset %s" % sample
         for ref in os.listdir(self.reference):
             testset = os.path.join(self.testing, sample)
             bf = os.path.join(self.bloom_dir, os.path.splitext(ref)[0]+".bloom")
             print(testset, bf)
             facs.query(testset, bf)
Exemple #8
0
    def test_2_query(self):
        """ Generate dummy fastq files and query them against reference bloom filters.
        """
        for nreads in self.fastq_nreads:
            test_fname = "test%s.fastq" % nreads
            helpers.generate_dummy_fastq(os.path.join(self.synthetic_fastq,
                                                      test_fname), nreads)

        for ref in os.listdir(self.reference):
            qry = os.path.join(self.synthetic_fastq, test_fname)
            bf = os.path.join(self.bloom_dir, os.path.splitext(ref)[0]+".bloom")
            print(qry, bf)
    	    facs.query(qry, bf)
Exemple #9
0
 def test_2_query(self):
     """ Query against datasets (generated by simNGS)
     """
     for sample in glob.glob(os.path.join(self.synthetic_fastq, "*.fastq")):
         for ref in os.listdir(self.reference):
             qry = os.path.join(self.synthetic_fastq, sample)
             bf = os.path.join(self.bloom_dir, os.path.splitext(ref)[0]+".bloom")
             print(qry, bf)
             json_doc = facs.query(qry, bf)
             self.results.append(json_doc)
Exemple #10
0
 def test_2_query(self):
     """ Query against datasets (generated by simNGS)
     """
     for sample in glob.glob(os.path.join(self.synthetic_fastq, "*.fastq")):
         for ref in os.listdir(self.reference):
             qry = os.path.join(self.synthetic_fastq, sample)
             bf = os.path.join(self.bloom_dir, os.path.splitext(ref)[0]+".bloom")
             print(qry, bf)
             mem = [-1]
             if profile:
                 mem, json_doc = memory_usage((facs.query, (qry, bf),), include_children=True, retval=True)
             else:
                 json_doc = facs.query(qry, bf)
             json_dict = json.loads(json_doc)
             json_dict['memory_usage'] = mem
             self.results.append(json.dumps(json_dict))
Exemple #11
0
 def test_2_run_low_complexity(self):
     #XXX collate the JSON output in a better way
     for sample in glob.glob(os.path.join(self.synthetic, "*.fna")):
         for ref in os.listdir(self.reference):
             facs.query(os.path.join(self.synthetic, sample),
                        os.path.join(self.bloom_dir, os.path.splitext(ref)[0]+".bloom"))
 def test_query_NA21137_illumina(self):
     """ Query gzip compressed fastq files
     """
     for sample in glob.glob(os.path.join(self.custom_dir, "*.fastq.gz")):
         facs.query(os.path.join(self.custom_dir, sample), os.path.join(self.bloom_dir, "U00096.2.bloom"))