def test_consume_partitioned_seqfile_and_label(Graphtype): infile = utils.get_test_data('valid-read-testing.fq') # read this in consume_and_tag graph = Graphtype(15, *params_1m) x = GraphLabels(graph) x.consume_partitioned_fasta_and_tag_with_labels(infile) assert x.n_labels == 9
def test_consume_partitioned_seqfile_and_label(Graphtype): infile = utils.get_test_data('valid-read-testing.fq') # read this in consume_and_tag graph = Graphtype(15, *params_1m) x = GraphLabels(graph) x.consume_partitioned_fasta_and_tag_with_labels(infile) assert x.n_labels == 9
def test_consume_partitioned_fasta_and_tag_with_labels(): lb = GraphLabels(20, 1e7, 4) filename = utils.get_test_data('real-partition-small.fa') lb.consume_partitioned_fasta_and_tag_with_labels(filename) labels = set() for record in screed.open(filename): seq = record.sequence labels.update(lb.sweep_label_neighborhood(seq, 0, False, False)) # print(lb.n_labels()) # print(labels) assert len(labels) == 1 assert labels.pop() == 2 assert lb.n_labels() == 1
def test_consume_partitioned_fasta_and_tag_with_labels(): lb = GraphLabels(20, 1e7, 4) filename = utils.get_test_data('real-partition-small.fa') lb.consume_partitioned_fasta_and_tag_with_labels( filename) labels = set() for record in screed.open(filename): seq = record.sequence labels.update(lb.sweep_label_neighborhood(seq, 0, False, False)) # print(lb.n_labels()) # print(labels) assert len(labels) == 1 assert labels.pop() == 2 assert lb.n_labels() == 1