geoseeq 0.6.14.dev5__py3-none-any.whl → 0.6.14.dev6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- geoseeq/cli/main.py +1 -1
- geoseeq/cli/upload/upload_reads.py +11 -3
- geoseeq/project.py +7 -8
- {geoseeq-0.6.14.dev5.dist-info → geoseeq-0.6.14.dev6.dist-info}/METADATA +1 -1
- {geoseeq-0.6.14.dev5.dist-info → geoseeq-0.6.14.dev6.dist-info}/RECORD +9 -9
- {geoseeq-0.6.14.dev5.dist-info → geoseeq-0.6.14.dev6.dist-info}/LICENSE +0 -0
- {geoseeq-0.6.14.dev5.dist-info → geoseeq-0.6.14.dev6.dist-info}/WHEEL +0 -0
- {geoseeq-0.6.14.dev5.dist-info → geoseeq-0.6.14.dev6.dist-info}/entry_points.txt +0 -0
- {geoseeq-0.6.14.dev5.dist-info → geoseeq-0.6.14.dev6.dist-info}/top_level.txt +0 -0
geoseeq/cli/main.py
CHANGED
@@ -55,7 +55,7 @@ def version():
|
|
55
55
|
Use of this tool implies acceptance of the GeoSeeq End User License Agreement.
|
56
56
|
Run `geoseeq eula show` to view the EULA.
|
57
57
|
"""
|
58
|
-
click.echo('0.6.
|
58
|
+
click.echo('0.6.14dev6') # remember to update pyproject.toml
|
59
59
|
|
60
60
|
|
61
61
|
@main.group('advanced')
|
@@ -118,11 +118,19 @@ def _is_fastq(path, fq_exts=['.fastq', '.fq'], compression_exts=['.gz', '.bz2',
|
|
118
118
|
return False
|
119
119
|
|
120
120
|
|
121
|
-
def
|
121
|
+
def _is_fasta(path, fa_exts=['.fasta', '.fa'], compression_exts=['.gz', '.bz2', '']):
|
122
|
+
for fa_ext in fa_exts:
|
123
|
+
for compression_ext in compression_exts:
|
124
|
+
if path.endswith(fa_ext + compression_ext):
|
125
|
+
return True
|
126
|
+
return False
|
127
|
+
|
128
|
+
|
129
|
+
def flatten_list_of_fastxs(filepaths):
|
122
130
|
"""Turn a list of fastq filepaths and txt files containing fastq filepaths into a single list of fastq filepaths."""
|
123
131
|
flattened = []
|
124
132
|
for path in filepaths:
|
125
|
-
if _is_fastq(path):
|
133
|
+
if _is_fastq(path) or _is_fasta(path):
|
126
134
|
flattened.append(path)
|
127
135
|
else:
|
128
136
|
with open(path) as f:
|
@@ -218,7 +226,7 @@ def cli_upload_reads_wizard(state, cores, overwrite, yes, regex, private, link_t
|
|
218
226
|
"""
|
219
227
|
knex = state.get_knex()
|
220
228
|
proj = handle_project_id(knex, project_id, yes, private)
|
221
|
-
filepaths = {basename(line): line for line in
|
229
|
+
filepaths = {basename(line): line for line in flatten_list_of_fastxs(fastq_files)}
|
222
230
|
click.echo(f'Found {len(filepaths)} files to upload.', err=True)
|
223
231
|
regex = _get_regex(knex, filepaths, module_name, proj, regex)
|
224
232
|
groups = _group_files(knex, filepaths, module_name, regex, yes)
|
geoseeq/project.py
CHANGED
@@ -170,20 +170,19 @@ class Project(RemoteObject):
|
|
170
170
|
Alias for result_folder."""
|
171
171
|
return self.result_folder(*args, **kwargs)
|
172
172
|
|
173
|
-
def get_samples(self, cache=True, error_handler=None):
|
173
|
+
def get_samples(self, cache=True, error_handler=None, fetch=True):
|
174
174
|
"""Yield samples fetched from the server."""
|
175
175
|
if cache and self._get_sample_cache:
|
176
176
|
for sample in self._get_sample_cache:
|
177
177
|
yield sample
|
178
178
|
return
|
179
|
-
url = f"sample_groups/{self.uuid}/samples"
|
179
|
+
url = f"sample_groups/{self.uuid}/samples-list?page=1&page_size=100"
|
180
180
|
for sample_blob in paginated_iterator(self.knex, url, error_handler=error_handler):
|
181
181
|
sample = self.sample(sample_blob["name"])
|
182
|
-
sample.
|
183
|
-
sample.
|
184
|
-
|
185
|
-
|
186
|
-
sample._already_fetched = True
|
182
|
+
sample.uuid = sample_blob["uuid"]
|
183
|
+
sample.metadata = sample_blob["metadata"]
|
184
|
+
if fetch:
|
185
|
+
sample.get()
|
187
186
|
sample._modified = False
|
188
187
|
if cache:
|
189
188
|
self._get_sample_cache.append(sample)
|
@@ -199,7 +198,7 @@ class Project(RemoteObject):
|
|
199
198
|
for sample in self._get_sample_cache:
|
200
199
|
yield sample.uuid
|
201
200
|
return
|
202
|
-
url = f"sample_groups/{self.uuid}/samples"
|
201
|
+
url = f"sample_groups/{self.uuid}/samples-list?page=1"
|
203
202
|
for sample_blob in paginated_iterator(self.knex, url, error_handler=error_handler):
|
204
203
|
yield sample_blob['uuid']
|
205
204
|
|
@@ -7,7 +7,7 @@ geoseeq/file_system_cache.py,sha256=HzVZWtwLD2fjWWSo_UfWmGeBltm9He4lP_OqzKwNGWg,
|
|
7
7
|
geoseeq/knex.py,sha256=zcjafsmUn9SC3LlRnvvaXpr-pHYZ0IXk7LpzuUoE3MI,8312
|
8
8
|
geoseeq/organization.py,sha256=bJkYL8_D-k6IYAaii2ZbxjwYnXy6lvu6iLXscxKlA3w,2542
|
9
9
|
geoseeq/pipeline.py,sha256=89mhWaecsKnm6tyRkdkaVp4dmZh62_v42Ze0oXf8OTY,9873
|
10
|
-
geoseeq/project.py,sha256=
|
10
|
+
geoseeq/project.py,sha256=Ba3yvrSyPVnEM5_VGSQu6YPH3CTwE3fHs4JjAepEK7g,13880
|
11
11
|
geoseeq/remote_object.py,sha256=GYN6PKU7Zz3htIdpFjfZiFejzGqqJHbJyKlefM1Eixk,7151
|
12
12
|
geoseeq/sample.py,sha256=HAfMiDPHp1UJgIA2lI6oGnNit4YKyj7nx9X07CCN98U,8316
|
13
13
|
geoseeq/search.py,sha256=gawad6Cx5FxJBPlYkXWb-UKAO-UC0_yhvyU9Ca1kaNI,3388
|
@@ -24,7 +24,7 @@ geoseeq/cli/download.py,sha256=cOLIVzAfxpOJnSd4WKWR-HCkOrKjPMbgYaNXDSd9i90,21305
|
|
24
24
|
geoseeq/cli/fastq_utils.py,sha256=-bmeQLaiMBm57zWOF0R5OlWTU0_3sh1JBC1RYw2BOFM,3083
|
25
25
|
geoseeq/cli/find_grn.py,sha256=oMDxkzGQBQb2_cCuvmwoeHOsFHqyO9RLeJzrB6bAe5M,439
|
26
26
|
geoseeq/cli/get_eula.py,sha256=79mbUwyiF7O1r0g6UTxG9kJGQEqKuH805E6eLkPC6Y4,997
|
27
|
-
geoseeq/cli/main.py,sha256=
|
27
|
+
geoseeq/cli/main.py,sha256=ufRoSCJh1D5jas9rZO6ypKRHTRh0jL2ET7fXAV5oD2E,3987
|
28
28
|
geoseeq/cli/manage.py,sha256=wGXAcVaXqE5JQEU8Jh6OlHr02nB396bpS_SFcOZdrEo,5929
|
29
29
|
geoseeq/cli/progress_bar.py,sha256=p1Xl01nkYxSBZCB30ue2verIIi22W93m3ZAMAxipD0g,738
|
30
30
|
geoseeq/cli/project.py,sha256=V5SdXm2Hwo2lxrkpwRDedw-mAE4XnM2uwT-Gj1D90VQ,3030
|
@@ -43,7 +43,7 @@ geoseeq/cli/shared_params/opts_and_args.py,sha256=_DcJ-TqgrbBaeDd-kuHEx2gLZPQN6E
|
|
43
43
|
geoseeq/cli/upload/__init__.py,sha256=3C9_S9t7chmYU-2ot89NV03x-EtmsjibulErKaU9w1k,627
|
44
44
|
geoseeq/cli/upload/upload.py,sha256=JZkhe1q3KOp7-tKyzwi860TQhZoNDnZs4yB2PJhOjl0,10081
|
45
45
|
geoseeq/cli/upload/upload_advanced.py,sha256=Jq5eGe-wOdrzxGWVwaFPg0BAJcW0YSx_eHEmYjJeKuA,3434
|
46
|
-
geoseeq/cli/upload/upload_reads.py,sha256=
|
46
|
+
geoseeq/cli/upload/upload_reads.py,sha256=Q5gihBmQM9jQx0QSj5qPH8sc8CkVNE1_DD5JradXBdg,10990
|
47
47
|
geoseeq/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
48
48
|
geoseeq/contrib/ncbi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
49
49
|
geoseeq/contrib/ncbi/api.py,sha256=WQeLoGA_-Zha-QeSO8_i7HpvXyD8UkV0qc5okm11KiA,1056
|
@@ -87,9 +87,9 @@ geoseeq/vc/vc_stub.py,sha256=IQr8dI0zsWKVAeY_5ybDD6n49_3othcgfHS3P0O9tuY,3110
|
|
87
87
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
88
88
|
tests/test_api_client.py,sha256=TS5njc5pcPP_Ycy-ljcfPVT1hQRBsFVdQ0lCqBmoesU,12810
|
89
89
|
tests/test_plotting.py,sha256=TcTu-2ARr8sxZJ7wPQxmbs3-gHw7uRvsgrhhhg0qKik,784
|
90
|
-
geoseeq-0.6.14.
|
91
|
-
geoseeq-0.6.14.
|
92
|
-
geoseeq-0.6.14.
|
93
|
-
geoseeq-0.6.14.
|
94
|
-
geoseeq-0.6.14.
|
95
|
-
geoseeq-0.6.14.
|
90
|
+
geoseeq-0.6.14.dev6.dist-info/LICENSE,sha256=IuhIl1XCxXLPLJT_coN1CNqQU4Khlq7x4IdW7ioOJD8,1067
|
91
|
+
geoseeq-0.6.14.dev6.dist-info/METADATA,sha256=Yg0PM7m43T1S2-aC-vXwJsQ4SDh1JqkUqAbL2qePFBk,4937
|
92
|
+
geoseeq-0.6.14.dev6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
93
|
+
geoseeq-0.6.14.dev6.dist-info/entry_points.txt,sha256=yF-6KDM8zXib4Al0qn49TX-qM7PUkWUIcYtsgt36rjM,45
|
94
|
+
geoseeq-0.6.14.dev6.dist-info/top_level.txt,sha256=zZk7mmeaqAYqFJG8nq2DTgSQPbflRjJwkDIhNURPDEU,14
|
95
|
+
geoseeq-0.6.14.dev6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|