mutts 1.0.4__tar.gz → 1.0.5__tar.gz
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.
- {mutts-1.0.4 → mutts-1.0.5}/PKG-INFO +6 -4
- {mutts-1.0.4 → mutts-1.0.5}/README.md +5 -3
- {mutts-1.0.4 → mutts-1.0.5}/pyproject.toml +1 -1
- {mutts-1.0.4 → mutts-1.0.5}/src/mutts/cli.py +4 -2
- {mutts-1.0.4 → mutts-1.0.5}/src/mutts/retriever.py +1 -1
- {mutts-1.0.4 → mutts-1.0.5}/src/mutts/__init__.py +0 -0
- {mutts-1.0.4 → mutts-1.0.5}/src/mutts/spreadsheet.py +0 -0
- {mutts-1.0.4 → mutts-1.0.5}/src/mutts/static-excel-tabs/JGI.Metagenome.NA.v15.xlsx +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mutts
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
4
4
|
Summary: Metadata for User facility Template Transformations
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: NMDC,US DOE user facilities,metadata translation
|
|
@@ -62,9 +62,10 @@ The documentation and setup instructions in this section are meant for any user
|
|
|
62
62
|
|
|
63
63
|
This is required for running the examples in the [Usage](#usage) section below (after going through all the [Installation](#installation) steps).
|
|
64
64
|
|
|
65
|
-
Create a `.env` file in your working directory:
|
|
65
|
+
Create a `.env` file in your working directory with the following environment variables:
|
|
66
66
|
```bash
|
|
67
67
|
echo "DATA_PORTAL_REFRESH_TOKEN=your_token_here" > .env
|
|
68
|
+
echo "SUBMISSION_PORTAL_BASE_URL=https://data.microbiomedata.org" >> .env
|
|
68
69
|
```
|
|
69
70
|
|
|
70
71
|
To get your access token:
|
|
@@ -187,7 +188,7 @@ The software consists of two main components:
|
|
|
187
188
|
- The `sub_port_mapping` keyword specifies mappings between Submission Portal columns/slots (as dictated by the [NMDC submission schema](https://microbiomedata.github.io/submission-schema/)) and user facility template columns
|
|
188
189
|
- Examples available in [input-files/](input-files/)
|
|
189
190
|
|
|
190
|
-
|
|
191
|
+
2. **`mutts` CLI**
|
|
191
192
|
- Command-line application that performs the metadata conversion
|
|
192
193
|
- Consumes mapper files and submission data as inputs
|
|
193
194
|
|
|
@@ -215,9 +216,10 @@ This installs the `mutts` package in development mode and creates the `mutts` co
|
|
|
215
216
|
cp .env.example .env # if available, or create a new .env file
|
|
216
217
|
```
|
|
217
218
|
|
|
218
|
-
Add your NMDC API token:
|
|
219
|
+
Add your NMDC API token and submission portal base URL:
|
|
219
220
|
```
|
|
220
221
|
DATA_PORTAL_REFRESH_TOKEN=your_token_here
|
|
222
|
+
SUBMISSION_PORTAL_BASE_URL=https://data.microbiomedata.org
|
|
221
223
|
```
|
|
222
224
|
|
|
223
225
|
Get your token from: https://data.microbiomedata.org/user
|
|
@@ -38,9 +38,10 @@ The documentation and setup instructions in this section are meant for any user
|
|
|
38
38
|
|
|
39
39
|
This is required for running the examples in the [Usage](#usage) section below (after going through all the [Installation](#installation) steps).
|
|
40
40
|
|
|
41
|
-
Create a `.env` file in your working directory:
|
|
41
|
+
Create a `.env` file in your working directory with the following environment variables:
|
|
42
42
|
```bash
|
|
43
43
|
echo "DATA_PORTAL_REFRESH_TOKEN=your_token_here" > .env
|
|
44
|
+
echo "SUBMISSION_PORTAL_BASE_URL=https://data.microbiomedata.org" >> .env
|
|
44
45
|
```
|
|
45
46
|
|
|
46
47
|
To get your access token:
|
|
@@ -163,7 +164,7 @@ The software consists of two main components:
|
|
|
163
164
|
- The `sub_port_mapping` keyword specifies mappings between Submission Portal columns/slots (as dictated by the [NMDC submission schema](https://microbiomedata.github.io/submission-schema/)) and user facility template columns
|
|
164
165
|
- Examples available in [input-files/](input-files/)
|
|
165
166
|
|
|
166
|
-
|
|
167
|
+
2. **`mutts` CLI**
|
|
167
168
|
- Command-line application that performs the metadata conversion
|
|
168
169
|
- Consumes mapper files and submission data as inputs
|
|
169
170
|
|
|
@@ -191,9 +192,10 @@ This installs the `mutts` package in development mode and creates the `mutts` co
|
|
|
191
192
|
cp .env.example .env # if available, or create a new .env file
|
|
192
193
|
```
|
|
193
194
|
|
|
194
|
-
Add your NMDC API token:
|
|
195
|
+
Add your NMDC API token and submission portal base URL:
|
|
195
196
|
```
|
|
196
197
|
DATA_PORTAL_REFRESH_TOKEN=your_token_here
|
|
198
|
+
SUBMISSION_PORTAL_BASE_URL=https://data.microbiomedata.org
|
|
197
199
|
```
|
|
198
200
|
|
|
199
201
|
Get your token from: https://data.microbiomedata.org/user
|
|
@@ -107,11 +107,13 @@ def cli(
|
|
|
107
107
|
# Write the generated data to 'DATA SHEET'
|
|
108
108
|
user_facility_spreadsheet.to_excel(writer, index=False, sheet_name='DATA SHEET')
|
|
109
109
|
|
|
110
|
-
# Check if mapper is one of the v15 JGI templates
|
|
110
|
+
# Check if mapper is one of the v15 or v16 JGI templates
|
|
111
111
|
mapper_basename = os.path.basename(mapper)
|
|
112
112
|
jgi_v15_mappers = ['jgi_mg_header_v15.json', 'jgi_mt_header_v15.json']
|
|
113
|
+
jgi_v16_mappers = ['jgi_mg_header_v16.json', 'jgi_mt_header_v16.json']
|
|
114
|
+
jgi_mappers = jgi_v15_mappers + jgi_v16_mappers
|
|
113
115
|
|
|
114
|
-
if mapper_basename in
|
|
116
|
+
if mapper_basename in jgi_mappers:
|
|
115
117
|
# Path to static JGI v15 Excel template
|
|
116
118
|
static_excel_path = os.path.join(
|
|
117
119
|
os.path.dirname(__file__), 'static-excel-tabs', 'JGI.Metagenome.NA.v15.xlsx'
|
|
@@ -189,7 +189,7 @@ class MetadataRetriever:
|
|
|
189
189
|
|
|
190
190
|
# Address 'Was sample DNAse treated?' col
|
|
191
191
|
# Change from 'yes/no' to 'Y/N'
|
|
192
|
-
if self.user_facility in ["jgi_mg", "jgi_mt"] and "dnase" in df.columns:
|
|
192
|
+
if self.user_facility in ["jgi_mg", "jgi_mt", "jgi_mg_lr"] and "dnase" in df.columns:
|
|
193
193
|
df.loc[df["dnase"] == "yes", "dnase"] = "Y"
|
|
194
194
|
df.loc[df["dnase"] == "no", "dnase"] = "N"
|
|
195
195
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|