geoseeq 0.7.3.dev4__py3-none-any.whl → 0.7.4__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/constants.py CHANGED
@@ -1,11 +1,11 @@
1
1
  SINGLE_END="short_read::single_end"
2
2
  PAIRED_END="short_read::paired_end"
3
3
  NANOPORE="long_read::nanopore"
4
+ PACBIO="long_read::pacbio"
4
5
 
5
6
  READ_MODULE_NAMES = [
6
7
  SINGLE_END,
7
8
  PAIRED_END,
8
9
  NANOPORE,
10
+ PACBIO,
9
11
  ]
10
-
11
-
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.7.3dev0") # remember to update pyproject.toml
58
+ click.echo("0.7.4") # remember to update pyproject.toml
59
59
 
60
60
 
61
61
  @main.group("advanced")
@@ -1,9 +1,10 @@
1
+ # pylint: disable=line-too-long
1
2
  import logging
2
3
  import click
3
4
  import requests
4
5
  from os.path import basename
5
6
  import pandas as pd
6
- from multiprocessing import Pool, current_process
7
+ from multiprocessing import current_process
7
8
 
8
9
  from geoseeq.cli.constants import *
9
10
  from geoseeq.cli.shared_params import (
@@ -46,10 +47,10 @@ def _upload_one_file(args):
46
47
 
47
48
  def _get_regex(knex, filepaths, module_name, lib, regex):
48
49
  """Return a regex that will group the files into samples
49
-
50
+
50
51
  Tell the user how many files did could not be matched using the regex.
51
52
  """
52
- seq_length, seq_type = module_name.split('::')[:2]
53
+ _, seq_type = module_name.split('::')[:2]
53
54
  args = {
54
55
  'filenames': list(filepaths.keys()),
55
56
  'sequence_type': seq_type,
@@ -181,7 +182,13 @@ def flatten_list_of_bams(filepaths):
181
182
  @private_option
182
183
  @link_option
183
184
  @no_new_versions_option
184
- @click.option('--name-map', default=None, nargs=3, help="A file to use for converting names. Takes three arguments: a file name, a column name for current names, and a column name for new names.")
185
+ @click.option(
186
+ '--name-map',
187
+ default=None,
188
+ nargs=3,
189
+ required=False,
190
+ help='Optional CSV and column names used to map existing names to new ones. Provide: <file> <current_name_col> <new_name_col>.'
191
+ )
185
192
  @module_option(FASTQ_MODULE_NAMES)
186
193
  @project_id_arg
187
194
  @click.argument('fastq_files', type=click.Path(exists=True), nargs=-1)
@@ -214,15 +221,23 @@ def cli_upload_reads_wizard(state, cores, overwrite, yes, regex, private, link_t
214
221
  $ ls -1 path/to/fastq/files/*.fastq.gz > file_list.txt
215
222
  $ geoseeq upload reads --yes --overwrite "GeoSeeq/Example CLI Project" file_list.txt
216
223
 
224
+ \b
225
+ # Remap sample names using a CSV file with current and new names
226
+ $ geoseeq upload reads --name-map sample_map.csv current_name new_name "GeoSeeq/Example CLI Project" fastq_files.txt
227
+
217
228
  ---
218
229
 
230
+ The optional ``--name-map`` flag takes three values: a CSV filename,
231
+ the column containing current names and the column containing new names.
232
+ When provided, sample names will be translated during upload.
233
+
219
234
  Command Arguments:
220
-
235
+
221
236
  [PROJECT_ID] Can be a project UUID, GeoSeeq Resource Number (GRN), or an
222
237
  organization name and project name separated by a slash.
223
238
 
224
239
  \b
225
- Examples:
240
+ Examples:
226
241
  - Name pair: "GeoSeeq/Example CLI Project"
227
242
  - UUID: "ed59b913-91ec-489b-a1b9-4ea137a6e5cf"
228
243
  - GRN: "grn:gs1:project:ed59b913-91ec-489b-a1b9-4ea137a6e5cf"
@@ -284,12 +299,12 @@ def cli_upload_reads_wizard(state, cores, overwrite, yes, regex, private, link_t
284
299
  ---
285
300
 
286
301
  Command Arguments:
287
-
302
+
288
303
  [PROJECT_ID] Can be a project UUID, GeoSeeq Resource Number (GRN), or an
289
304
  organization name and project name separated by a slash.
290
305
 
291
306
  \b
292
- Examples:
307
+ Examples:
293
308
  - Name pair: "GeoSeeq/Example CLI Project"
294
309
  - UUID: "ed59b913-91ec-489b-a1b9-4ea137a6e5cf"
295
310
  - GRN: "grn:gs1:project:ed59b913-91ec-489b-a1b9-4ea137a6e5cf"
@@ -303,4 +318,14 @@ def cli_upload_reads_wizard(state, cores, overwrite, yes, regex, private, link_t
303
318
  # filepaths = {basename(line): line for line in flatten_list_of_bams(files)}
304
319
  # click.echo(f'Found {len(filepaths)} files to upload.', err=True)
305
320
  # groups = _group_files(knex, filepaths, 'bam::bam', regex, yes)
306
- # _do_upload(groups, 'bam::bam', link_type, proj, filepaths, overwrite, no_new_versions, cores, state)
321
+ # _do_upload(
322
+ # groups,
323
+ # 'bam::bam',
324
+ # link_type,
325
+ # proj,
326
+ # filepaths,
327
+ # overwrite,
328
+ # no_new_versions,
329
+ # cores,
330
+ # state,
331
+ # )
geoseeq/constants.py CHANGED
@@ -7,6 +7,7 @@ FASTQ_MODULE_NAMES = [
7
7
  'short_read::paired_end',
8
8
  'short_read::single_end',
9
9
  'long_read::nanopore',
10
+ 'long_read::pacbio',
10
11
  'raw::raw_reads',
11
12
  'genome::fasta',
12
13
  ]
@@ -16,4 +17,12 @@ CONFIG_FOLDER = environ.get("XDG_CONFIG_HOME", join(environ["HOME"], ".config"))
16
17
  CONFIG_DIR = environ.get("GEOSEEQ_CONFIG_DIR", join(CONFIG_FOLDER, "geoseeq"))
17
18
  PROFILES_PATH = join(CONFIG_DIR, "profiles.json")
18
19
 
19
- OBJECT_TYPE_STR = Literal['org', 'project', 'sample', 'sample_result_folder', 'project_result_folder', 'sample_result_file', 'project_result_file']
20
+ OBJECT_TYPE_STR = Literal[
21
+ 'org',
22
+ 'project',
23
+ 'sample',
24
+ 'sample_result_folder',
25
+ 'project_result_folder',
26
+ 'sample_result_file',
27
+ 'project_result_file',
28
+ ]
geoseeq/sample.py CHANGED
@@ -1,6 +1,6 @@
1
1
  import urllib
2
2
  from .remote_object import RemoteObject
3
- from .result import SampleResultFile, SampleResultFolder
3
+ from .result import SampleResultFolder
4
4
 
5
5
 
6
6
  class Sample(RemoteObject):
@@ -166,12 +166,14 @@ class Sample(RemoteObject):
166
166
  "short_read::paired_end"
167
167
  "short_read::single_end"
168
168
  "long_read::nanopore"
169
+ "long_read::pacbio"
169
170
  """
170
171
  if preference_order is None:
171
172
  preference_order = [
172
173
  "short_read::paired_end",
173
174
  "short_read::single_end",
174
175
  "long_read::nanopore",
176
+ "long_read::pacbio",
175
177
  ]
176
178
  all_fastqs = self.get_all_fastqs()
177
179
  for read_type in preference_order:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: geoseeq
3
- Version: 0.7.3.dev4
3
+ Version: 0.7.4
4
4
  Summary: GeoSeeq command line tools and python API
5
5
  Project-URL: Homepage, https://github.com/biotia/geoseeq_api_client
6
6
  Project-URL: Issues, https://github.com/biotia/geoseeq_api_client/issues
@@ -84,7 +84,7 @@ $ geoseeq download files --extension fastq.gz "GeoSeeq/Example CLI Project"
84
84
 
85
85
  GeoSeeq can automatically group fastq files into samples according to their
86
86
  sample name, read number, and lane number. It supports paired end, single end,
87
- and nanopore reads.
87
+ nanopore, and pacbio reads.
88
88
 
89
89
  Assume you have data from a single ended sequencing run stored as fastq files:
90
90
  - Sample1_L1_R1.fastq.gz
@@ -115,6 +115,12 @@ GeoSeeq will automatically create a new sample named `Sample1` if it does not al
115
115
 
116
116
  This command would upload data [to this project.](https://portal.geoseeq.com/sample-groups/ed59b913-91ec-489b-a1b9-4ea137a6e5cf/samples). Since only organization members can upload data, you will need to replace `GeoSeeq` with your organization name.
117
117
 
118
+ To rename samples on the fly, provide a CSV file with current and new names using the `--name-map` option:
119
+
120
+ ```
121
+ $ geoseeq upload reads --name-map sample_map.csv current_name new_name "GeoSeeq/Example CLI Project" fastq_files.txt
122
+ ```
123
+
118
124
  Note: You will need to have an API token set to use this command (see above)
119
125
 
120
126
  ## Using the Python API in a program
@@ -2,14 +2,14 @@ geoseeq/__init__.py,sha256=YqYqeHbqjgWI5OBIxkPXNvLISOjVWaNwVFy6AGJ7uwc,982
2
2
  geoseeq/app.py,sha256=Y6d1UzxFLfE3RNccATbFCVi6kH3eFmzwoUbeR2Ry09A,2387
3
3
  geoseeq/blob_constructors.py,sha256=AkWpDQY0EdGMxF1p6eRspyHKubcUdiW4it-_Q7S2QWk,188
4
4
  geoseeq/bulk_creators.py,sha256=pdn-Dv7yv5SFv-PfDuQbuOnw2W4-BfIfRJVRAhM8U6s,2115
5
- geoseeq/constants.py,sha256=KmWH3gwHLd3toTWLWSViV_1eAYzPOPZ5bv6INpgwzQI,665
5
+ geoseeq/constants.py,sha256=Vi9tahoQI6vnRaYoXuzZ7Dq12oAwwPCBfmPYeDWbjDE,722
6
6
  geoseeq/file_system_cache.py,sha256=HzVZWtwLD2fjWWSo_UfWmGeBltm9He4lP_OqzKwNGWg,4138
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
10
  geoseeq/project.py,sha256=jryxHMx5PdQNaMJWjlzgQmxJt_s2M-HAHARBCPd1Vzc,17075
11
11
  geoseeq/remote_object.py,sha256=GYN6PKU7Zz3htIdpFjfZiFejzGqqJHbJyKlefM1Eixk,7151
12
- geoseeq/sample.py,sha256=LeLJytRYERY5dkMIOWqANTPTun9wqei393qeNlPBw1U,10895
12
+ geoseeq/sample.py,sha256=oVUNnfqsRCCDUZdyI6fGylaMgLHd_7FLLJVGuOd5Jb8,10946
13
13
  geoseeq/search.py,sha256=gawad6Cx5FxJBPlYkXWb-UKAO-UC0_yhvyU9Ca1kaNI,3388
14
14
  geoseeq/smart_table.py,sha256=rihMsFUIn-vn4w6ukVZTHI9bjDSEr8xHExBfX8mwCHM,6169
15
15
  geoseeq/smart_tree.py,sha256=bSjDlwmOuNXutYJhytA1RovwRCHV6ZxXXJPiIGFhPaA,1825
@@ -18,14 +18,14 @@ geoseeq/user.py,sha256=tol8i1UGLRrbMw5jeJDnna1ikRgrCDd50Jxz0a1lSgg,690
18
18
  geoseeq/utils.py,sha256=ZXpWb2MetUIeLrExiXb7IaOXYrW1pvrdP3o0KWzbwCs,4035
19
19
  geoseeq/work_orders.py,sha256=5uLVVfdKE8qh4gGaHkdBpXJGRTujuSg59knWCqEET4A,8071
20
20
  geoseeq/cli/__init__.py,sha256=4WnK87K5seRK3SGJAxNWnQTqyg5uBhdhrOrzB1D4b3M,24
21
- geoseeq/cli/constants.py,sha256=Do5AUf9lMO9_P8KpFJ3XwwFBAWsxSjZ6sx9_QEGyC_c,176
21
+ geoseeq/cli/constants.py,sha256=NtRSNBuna42605LE0sVywTPfmzYQnG-3yrT_M7Ml5B0,213
22
22
  geoseeq/cli/copy.py,sha256=02U9kdrAIbbM8MlRMLL6p-LMYFSuRObE3h5jyvcL__M,2275
23
23
  geoseeq/cli/detail.py,sha256=q8Suu-j2k18knfSVFG-SWWGNsKM-n8y9RMA3LcIIi9Y,4132
24
24
  geoseeq/cli/download.py,sha256=Znjuc9IFOcIa5_Od9mFXHJdYAJtgw9Bc_wPPcOVXn7s,21298
25
25
  geoseeq/cli/fastq_utils.py,sha256=-bmeQLaiMBm57zWOF0R5OlWTU0_3sh1JBC1RYw2BOFM,3083
26
26
  geoseeq/cli/find_grn.py,sha256=oMDxkzGQBQb2_cCuvmwoeHOsFHqyO9RLeJzrB6bAe5M,439
27
27
  geoseeq/cli/get_eula.py,sha256=79mbUwyiF7O1r0g6UTxG9kJGQEqKuH805E6eLkPC6Y4,997
28
- geoseeq/cli/main.py,sha256=_P_pp_ohm0Pq390FgWjNw-oQA06KGbQPAGbvgY-iL6U,4137
28
+ geoseeq/cli/main.py,sha256=gHZzocvIrfigz9EP3V1BxPh5OFNsp6i6_jqbP6vb_a8,4133
29
29
  geoseeq/cli/manage.py,sha256=wGXAcVaXqE5JQEU8Jh6OlHr02nB396bpS_SFcOZdrEo,5929
30
30
  geoseeq/cli/progress_bar.py,sha256=p1Xl01nkYxSBZCB30ue2verIIi22W93m3ZAMAxipD0g,738
31
31
  geoseeq/cli/project.py,sha256=V5SdXm2Hwo2lxrkpwRDedw-mAE4XnM2uwT-Gj1D90VQ,3030
@@ -44,7 +44,7 @@ geoseeq/cli/shared_params/opts_and_args.py,sha256=_DcJ-TqgrbBaeDd-kuHEx2gLZPQN6E
44
44
  geoseeq/cli/upload/__init__.py,sha256=tRrljqG7uBM6zVBKpDw1zevHz6Vy418HuIYZKwByyWg,862
45
45
  geoseeq/cli/upload/upload.py,sha256=tBga8TW_5qXM4avXH5BAfLrYNms_5eqdyJZex47hZ90,14294
46
46
  geoseeq/cli/upload/upload_advanced.py,sha256=1pjtbe8EidIo4eR1_oVD00rPCTxYj8CRqB8D9buA62M,12432
47
- geoseeq/cli/upload/upload_reads.py,sha256=dZK_Mh3a3NdC4zVB4Yyfz-NViCK9_rROQbmLWTrh8Pc,11642
47
+ geoseeq/cli/upload/upload_reads.py,sha256=da_a-ojltmcUa1MGycMg8LLKd0ZXCZ8-F3zpuijwWd4,12181
48
48
  geoseeq/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
49
  geoseeq/contrib/ncbi/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  geoseeq/contrib/ncbi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -92,8 +92,8 @@ geoseeq/vc/vc_cache.py,sha256=P4LXTbq2zOIv1OhP7Iw5MmypR2vXuy29Pq5K6gRvi-M,730
92
92
  geoseeq/vc/vc_dir.py,sha256=A9CLTh2wWCRzZjiLyqXD1vhtsWZGD3OjaMT5KqlfAXI,457
93
93
  geoseeq/vc/vc_sample.py,sha256=qZeioWydXvfu4rGMs20nICfNcp46y_XkND-bHdV6P5M,3850
94
94
  geoseeq/vc/vc_stub.py,sha256=IQr8dI0zsWKVAeY_5ybDD6n49_3othcgfHS3P0O9tuY,3110
95
- geoseeq-0.7.3.dev4.dist-info/METADATA,sha256=4bfJLyjpSn16lfEIK8OvC5xbfLI4nKHhqGieH7PPsVE,5415
96
- geoseeq-0.7.3.dev4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
97
- geoseeq-0.7.3.dev4.dist-info/entry_points.txt,sha256=yF-6KDM8zXib4Al0qn49TX-qM7PUkWUIcYtsgt36rjM,45
98
- geoseeq-0.7.3.dev4.dist-info/licenses/LICENSE,sha256=IuhIl1XCxXLPLJT_coN1CNqQU4Khlq7x4IdW7ioOJD8,1067
99
- geoseeq-0.7.3.dev4.dist-info/RECORD,,
95
+ geoseeq-0.7.4.dist-info/METADATA,sha256=cJnudtWL38eoOqQF1IfjmYaslq5beDTFMNPYP7Y2vio,5652
96
+ geoseeq-0.7.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
97
+ geoseeq-0.7.4.dist-info/entry_points.txt,sha256=yF-6KDM8zXib4Al0qn49TX-qM7PUkWUIcYtsgt36rjM,45
98
+ geoseeq-0.7.4.dist-info/licenses/LICENSE,sha256=IuhIl1XCxXLPLJT_coN1CNqQU4Khlq7x4IdW7ioOJD8,1067
99
+ geoseeq-0.7.4.dist-info/RECORD,,