17
17
SingleLanePerSamplePairedEndFastqDirFmt ,
18
18
CasavaOneEightSingleLanePerSampleDirFmt )
19
19
20
- from q2_types . feature_data . _util import _read_fastq_seqs
20
+ from . _util import read_fastq_seqs
21
21
22
22
23
23
def subsample_single (sequences : SingleLanePerSampleSingleEndFastqDirFmt ,
@@ -31,7 +31,7 @@ def subsample_single(sequences: SingleLanePerSampleSingleEndFastqDirFmt,
31
31
fwd_path_in = str (sequences .path / fwd_name )
32
32
fwd_path_out = str (result .path / fwd_name )
33
33
with gzip .open (str (fwd_path_out ), mode = 'w' ) as fwd :
34
- for fwd_rec in _read_fastq_seqs (fwd_path_in ):
34
+ for fwd_rec in read_fastq_seqs (fwd_path_in ):
35
35
if random .random () <= fraction :
36
36
fwd .write (('\n ' .join (fwd_rec ) + '\n ' ).encode ('utf-8' ))
37
37
@@ -53,8 +53,8 @@ def subsample_paired(sequences: SingleLanePerSamplePairedEndFastqDirFmt,
53
53
rev_path_out = str (result .path / rev_name )
54
54
with gzip .open (str (fwd_path_out ), mode = 'w' ) as fwd :
55
55
with gzip .open (str (rev_path_out ), mode = 'w' ) as rev :
56
- file_pair = zip (_read_fastq_seqs (fwd_path_in ),
57
- _read_fastq_seqs (rev_path_in ))
56
+ file_pair = zip (read_fastq_seqs (fwd_path_in ),
57
+ read_fastq_seqs (rev_path_in ))
58
58
for fwd_rec , rev_rec in file_pair :
59
59
if random .random () <= fraction :
60
60
fwd .write (('\n ' .join (fwd_rec ) + '\n ' ).encode ('utf-8' ))
0 commit comments